An open source AutoML toolkit for automate machine learning lifecycle, including feature engineering, neural architecture search, model compression and hyper-parameter tuning.
I ran the darts example. When I computed top5 acc, line 19 in nni/examples/nas/oneshot/darts/utils.py raised RuntimeError:
view size is not compatible with input tensor's size and stride...
It seems after topk (line 9) and transpose (line 10) the tensor becomes non-contiguous and thus view method meets problem.
This issue seems to happen with newer versions of PyTorch (1.7+) and I suggest that we replace all view with reshape in implementation. Reshape would be the same as view if the tensor is contiguous, otherwise it would return a copy
Environment:
NNI version: 2.3
Training service (local|remote|pai|aml|etc): Local
Describe the issue:
I ran the darts example. When I computed top5 acc, line 19 in nni/examples/nas/oneshot/darts/utils.py raised RuntimeError:
view size is not compatible with input tensor's size and stride...
It seems after topk (line 9) and transpose (line 10) the tensor becomes non-contiguous and thus view method meets problem. This issue seems to happen with newer versions of PyTorch (1.7+) and I suggest that we replace all view with reshape in implementation. Reshape would be the same as view if the tensor is contiguous, otherwise it would return a copy
Environment: