idstcv / ZenNAS

218 stars 35 forks source link

Some simple questions #12

Closed fly2tortoise closed 2 years ago

fly2tortoise commented 2 years ago

Dear researcher, Hello
I ran into some problems while running the code that I couldn't solve when I wanted to test CIFAR10
(python val_cifar.py --dataset cifar10 --gpu 0 --arch zennet_cifar10_model_size05M_res32) image

RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.image

The version I use is Torch1.7.1 Torchvision0.8.2 cudatoolkit10.2.89. May I ask if this is a problem with my operating environment? Or do I need to make changes in the code? Thanks a million, dear researcher.

MingLin-home commented 2 years ago

Hi fly2tortoise,

Thank you for the feedback! In your case, replace .view(-1) with .reshape(-1) should fix your problem. Please let me know if this workaround cannot address your problem.

fly2tortoise commented 2 years ago

Thank you very much. I will consult you if I have any details in the future, which has solved my big problem

fly2tortoise commented 2 years ago

Dear researcher, Hello I have two more little questions to ask you about using this command (bash Zen_NAS_cifar_params1M. Sh) when I am searching on cifar10. I have a few questions: (1) I find that the search time is generally more than 12 hours. Is there something wrong with my method? image

(2) At the beginning of the search, there are two errors (Fail to import Hvd. fail to import apex.) image

(3) My machine has 8 P100 cards, and I find that I only run on GPU0. Is there any way to make all 8 Gpus work together?

I'm sorry for my childish question, but I really hope you can help me with it.Thank you very much, distinguished researcher.