gsp-27 / pytorch_squeezenet Goto Github PK
View Code? Open in Web Editor NEWImplementation of Squeezenet in pytorch, pretrained models on Cifar 10 data to come
Implementation of Squeezenet in pytorch, pretrained models on Cifar 10 data to come
NameError Traceback (most recent call last)
~\pytorch_Squeezenet-master\main.py in
204 fig2, ax2 = plt.subplots()
205 train_acc, val_acc = list(), list()
--> 206 for i in xrange(1,args.epoch+1):
207 train_acc.append(train(i))
208 val_acc.append(val())
NameError: name 'xrange' is not defined
Sorry to disturb. I tried to run squeezenet using pytorch on GPU. And I got this error at the end of Epoch 1.
Train Epoch: 1 [48992/50000 (98%)] Loss: 1.618558
Train Epoch: 1 [49312/50000 (99%)] Loss: 1.442842
Train Epoch: 1 [49632/50000 (99%)] Loss: 1.601359
Train Epoch: 1 [49952/50000 (100%)] Loss: 1.511631
Traceback (most recent call last):
File "main.py", line 228, in
train_acc.append(train(i))
File "main.py", line 131, in train
scores = scores.view(args.batch_size, args.num_classes)
RuntimeError: shape '[32, 10]' is invalid for input of size 160
Thank you for any suggestion.
Please tell me how to use other data sets, which are csv files
when i use a batch-size of 64, an runtime error occurs when it will almost finish the firt epoch training:
Train Epoch: 1 [49344/50000 (99%)] Loss: 1.619473
Train Epoch: 1 [49984/50000 (100%)] Loss: 1.664685
Traceback (most recent call last):
File "F:/paper_code/pytorch_Squeezenet/main.py", line 208, in
train_acc.append(train(i))
File "F:/paper_code/pytorch_Squeezenet/main.py", line 126, in train
scores = scores.view(args.batch_size, args.num_classes)
RuntimeError: shape '[64, 10]' is invalid for input of size 160
can anyone tell me what i should do?QAQ
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.