dataset_alt.py - cmikke97/Automatic-Malware-Signature-Generation GitHub Wiki
-
import configparser- implements a basic configuration language for Python programs - configparser documentation -
import os- provides a portable way of using operating system dependent functionality - os documentation -
import sys- system-specific parameters and functions - sys documentation
-
import numpy as np- the fundamental package for scientific computing with Python - numpy documentation -
import torch- tensor library like NumPy, with strong GPU support - pytorch documentation -
from logzero import logger- robust and effective logging for Python - logzero documentation
Dataset (class) - Pre-processed dataset class.
-
__init__(self, ds_root, mode, n_samples, return_shas)(member function) - Initialize Dataset class.-
ds_root(arg) - Pre-processed dataset root directory (where to find .dat files) -
mode(arg) - Mode of use of the dataset object (it may be 'train', 'validation' or 'test') (default: 'train') -
n_samples(arg) - Number of samples to consider (used just to access the right pre-processed files) (default: None) -
return_shas(arg) - Whether to return the sha256 of the data points or not (default: False)
-
-
__len__(self)*(member function) - Get dataset total length. -
__get_as_tensors__(self)(member function) - Get dataset tensors (numpy memmap arrays).