Intel® AI Reference Models: contains Intel optimizations for running deep learning workloads on Intel® Xeon® Scalable processors and Intel® Data Center GPUs
Apache License 2.0
674
stars
220
forks
source link
correct_k = correct[:k].view(-1).float().sum(0, keepdim=True) 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. #85
When pytorch is 1.7 in oneAPI AI toolkit, there is error in running case:
cd models/models/image_recognition/pytorch/common/
python main.py -d /home/wj/ImageNet/data/all -a resnet50 --epochs 100 --learning-rate 0.1 --print-freq 1 -b 64 –ipex
...
correct_k = correct[:k].view(-1).float().sum(0, keepdim=True)
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.
view() is not supported and use reshape() to fix it.
When pytorch is 1.7 in oneAPI AI toolkit, there is error in running case:
view() is not supported and use reshape() to fix it.