l3ickey / mprg-spring-seminar-competition-2021 Goto Github PK
View Code? Open in Web Editor NEWhttps://www.kaggle.com/c/mprg-spring-seminar-competition-2021/data
https://www.kaggle.com/c/mprg-spring-seminar-competition-2021/data
# 評価
print("評価を始めるっぴ!")
class_correct = list(0. for i in range(len(classes)))
class_total = list(0. for i in range(len(classes)))
with torch.no_grad():
for data in testloader:
images, labels = data[0].to(device), data[1].to(device)
outputs = net(images)
_, predicted = torch.max(outputs, 1)
c = (predicted == labels).squeeze()
for i in range(args.batch_size):
label = labels[i]
class_correct[label] += c[i].item()
class_total[label] += 1
下から4行目の for i in range(args.batch_size)
でバッチサイズ分ループを回しているが,テストデータの一番最後で batch_size で割り切れなかった端数のテストデータを扱う際も下から3行目の label = labels[i]
でバッチサイズ分アクセスしようとするためエラーが発生する.
学習時間を有効に使えるようになるためLine通知を飛ばす機能が欲しい。
1エポックに要する時間から終了予定時刻を自分で逆算してたけど,train.py に計算させれば良くね?というお気持ち.
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.