I noticed an issue , how to train an encoder network for supervised setting for --cases subject or --cases subject_large
ashwinj92 opened this issue · 2 comments
Hi,
First of all the framework is very well written and rounded. However I was trying to train the model under supervised setting under --cases subject.
I noticed the following:
The command used python main_supervised_baseline.py --batch_size 64 --lr 1e-4 --cases subject --dataset ucihar --backbone AE
File "C:\Users\mydoc\OneDrive\Documents\KDD-HAR code\CL-HAR-main\CL-HAR-main\main_supervised_baseline.py", line 234, in <module> best_model = train(args, train_loaders, val_loader, model, DEVICE, optimizer, criterion) File "C:\Users\mydoc\OneDrive\Documents\KDD-HAR code\CL-HAR-main\CL-HAR-main\main_supervised_baseline.py", line 102, in train for idx, (sample, target, domain) in enumerate(val_loader): TypeError: 'NoneType' object is not iterable
Thank you.
Hi @ashwinj92,
Thank you for your comments!
The val_loader
in subject case is None by default. We have fixed this error by ignoring NoneType val_loader. It should work now. Hope this helps!
Thank you Tian0426. The updates made resolved the issue.