analogdevicesinc / ai8x-training

Model Training for ADI's MAX78000 and MAX78002 Edge AI Devices
Apache License 2.0
86 stars 76 forks source link

DataLoader Function #205

Closed oussemajelassi closed 1 year ago

oussemajelassi commented 1 year ago

Hello, Reading this in Data Loader Design for MAX78000 Model Training : Example: def AISegment352_get_datasets(data, load_train=True, load_test=True). I was not able to understand what the argument data is. Especially that I saw in many examples this line of code : ( data_dir , args ) = data Am I obliged to do so if I wanna develop my own dataloader.

oussemajelassi commented 1 year ago

To be more precise where does it come from ( talking about data , data_dir and args

seldauyanik-maxim commented 1 year ago

Dear Oussama

data is a tuple as you also noted that is assumed to be in the format: (data_dir, args). data_dir: the specified data directory args is the arguments object supposed to have fields: act_mode_8bit and truncate_testset

act_mode_8bit field is important for the normalization part and utilized by ai8x.normalize method in the transformations part. For detailed use of these fields, you can take a look at one of the existing data loader implementations.