class IOTorch

Load and save file in the Torch format.

Inheritance:


Public Methods

[more] IOTorch()
[more]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.
[more]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
[more]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
[more]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

ovirtual void init()
ovoid addOption(const char* name, int size, void* ptr, const char* help="", bool is_allowed_after_init=false)
ovoid addIOption(const char* name, int* ptr, int init_value, const char* help="", bool is_allowed_after_init=false)
ovoid addROption(const char* name, real* ptr, real init_value, const char* help="", bool is_allowed_after_init=false)
ovoid addBOption(const char* name, bool* ptr, bool init_value, const char* help="", bool is_allowed_after_init=false)
ovoid setOption(const char* name, void* ptr)
ovoid setIOption(const char* name, int option)
ovoid setROption(const char* name, real option)
ovoid setBOption(const char* name, bool option)
ovirtual void loadFILE(FILE* file)
ovirtual void saveFILE(FILE* file)
ovoid load(const char* filename)
ovoid save(const char* filename)


Documentation

Load and save file in the Torch format.
o IOTorch()

oint 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:

oint 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

ovoid 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

ovoid 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++.