Traceback (most recent call last):
File "/home/akb/pytorch_learning/chap4_dogsandcats", line 110, in
epoch_loss, epoch_accuracy = fit(epoch,model,train_data_loader,phase='training')
File "/home/akb/pytorch_learning/chap4_dogsandcats", line 103, in fit
print(f'{phase} loss is {loss:{5}.{2}} and {phase} accuracy is {running_correct}/{len(data_loader.dataset)}{accuracy:{10}.{4}}')
File "/home/akb/anaconda3/lib/python3.6/site-packages/torch/tensor.py", line 337, in format
return self.item().format(format_spec)
ValueError: Precision not allowed in integer format specifier
我在使用CPU升华文本3中遇到此错误,为什么在GPU上可以正常使用。有人可以帮忙吗?