Load and save file in the Torch format.
Inheritance:
Public Methods
-
IOTorch()
-
int loadData(const char* file, real*** data_, real*** y_, int n_inputs, int n_targets, int* n_examples, bool bin=false, int max_load=-1)
- Load the file file.
-
int loadData(const char* file, sreal*** data_, real*** y_, int n_inputs, int n_targets, int* n_examples, bool bin=false, int max_load=-1)
- Sparse version of the previous function
-
void saveData(const char* file, real** data, real** y, int l, int n_inputs, int n_targets, bool bin=false, int max_save=-1)
- Similar function, but to save data
-
void saveData(const char* file, sreal** data, real** y, int l, int n_inputs, int n_targets, bool bin=false, int max_save=-1)
- Similar function, but to save sparse data
Inherited from Object:
Public Methods
-
virtual void init()
-
void addOption(const char* name, int size, void* ptr, const char* help="", bool is_allowed_after_init=false)
-
void addIOption(const char* name, int* ptr, int init_value, const char* help="", bool is_allowed_after_init=false)
-
void addROption(const char* name, real* ptr, real init_value, const char* help="", bool is_allowed_after_init=false)
-
void addBOption(const char* name, bool* ptr, bool init_value, const char* help="", bool is_allowed_after_init=false)
-
void setOption(const char* name, void* ptr)
-
void setIOption(const char* name, int option)
-
void setROption(const char* name, real option)
-
void setBOption(const char* name, bool option)
-
virtual void loadFILE(FILE* file)
-
virtual void saveFILE(FILE* file)
-
void load(const char* filename)
-
void save(const char* filename)
Documentation
Load and save file in the Torch format.
IOTorch()
int loadData(const char* file, real*** data_, real*** y_, int n_inputs, int n_targets, int* n_examples, bool bin=false, int max_load=-1)
- Load the file file.
Each example must have n_inputs inputs and n_targets targets.
bin is true if the file is in binary format.
If max_load > 0, load only the first max_load examples.
Returns:
- data_ which contains all inputs (the memory allocation is done by this function)
- y_ which contains all targets (the memory allocation is done by this function)
- n_examples which contains the real number of loaded examples.
int loadData(const char* file, sreal*** data_, real*** y_, int n_inputs, int n_targets, int* n_examples, bool bin=false, int max_load=-1)
- Sparse version of the previous function
void saveData(const char* file, real** data, real** y, int l, int n_inputs, int n_targets, bool bin=false, int max_save=-1)
- Similar function, but to save data
void saveData(const char* file, sreal** data, real** y, int l, int n_inputs, int n_targets, bool bin=false, int max_save=-1)
- Similar function, but to save sparse data
- This class has no child classes.
- Author:
- Ronan Collobert (collober@iro.umontreal.ca)
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.