snn_angular_velocity icon indicating copy to clipboard operation
snn_angular_velocity copied to clipboard

Batch Size 1 Error

Open jfkd147258 opened this issue 5 years ago • 5 comments
trafficstars

i am a college student from taiwan i follow the steps finally run python test.py after running some minutes i get this result Loading checkpoint from pretrained/cnn5-avgp-fc1.pt testing: 100%|████████████████████████████████████████████████| 2495/2495 [05:34<00:00, 7.46it/s] Traceback (most recent call last): File "test.py", line 34, in main() File "test.py", line 30, in main tester.test() File "/home/jfkd147258/snn_angular_velocity/utils/testing.py", line 45, in test self.data_collector.printErrors() File "/home/jfkd147258/snn_angular_velocity/utils/testing.py", line 80, in printErrors print('RMSE: {} deg/s'.format(rmse(pred, gt, deg=True))) File "/home/jfkd147258/snn_angular_velocity/model/metric.py", line 21, in rmse rmse = np.mean(np.sqrt(np.sum(np.square(pred - gt), axis=1).flatten())) ValueError: operands could not be broadcast together with shapes (7485,97) (2495,3,97)

can you help me where i was wrong...thank you

Mind if we contact us by email?

thank you very much I'm a rookie..so need yout help

jfkd147258 avatar Nov 25 '20 09:11 jfkd147258

You changed the batch size to 1 in the test_config.yaml. I did not account for this case. So if you change it to 2 you should be fine.

magehrig avatar Nov 30 '20 19:11 magehrig

thank you ! I try it, change the batch size to 2 and other parameter same as yours, but still got this error.

the reason why i change batch size is : if i did not change it , cuda will not get enough memory..

do you mind telling me the Hardware for doing this project?

thank you very much!

jfkd147258 avatar Dec 02 '20 03:12 jfkd147258

I can only reproduce this error if the batch size is set to 1. can you show me the config file that you used where you get this error without setting batch size to 1?

I used an Nvidia RTX 2080 for this project

magehrig avatar Dec 02 '20 18:12 magehrig

when i run python setup.py install it show "TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType" can you help me

WYCAS avatar Dec 30 '20 03:12 WYCAS

@holygoodman if this is not related to this issue, please open a new issue

magehrig avatar Feb 05 '21 15:02 magehrig