48. Small CNN Image Project in PyTorch
48.4 Holdout Check
48.4 Holdout check
नेहमी fresh batch check — Chapter 38 overfit lesson nets लाही लागू.
हे का शिकायचं?
Why. नेहमी fresh batch check करा — Chapter 38 overfit lesson nets लाही लागू.
हे काय आहे?
What. Same rules ने नवीन batch बनावा; model.eval() आणि torch.no_grad() ने evaluate.
कसं करायचं?
How.
Holdout check
- make_batch(64) as test.
- argmax ने classes predict.
- Accuracy print.
model.eval()
X_test, y_test = make_batch(64)
with torch.no_grad():
pred = model(X_test).argmax(1)
print("test acc", float((pred == y_test).float().mean()))
Ravindra Bagale's Tip
This easy synthetic task is mainly for learning the PyTorch API. Real photos will need much more data, and later also data augmentation, which means making extra training images by flipping, rotating or cropping them.
Ravindra Bagale's Tip – मराठी
हा सोपा synthetic task मुख्यतः PyTorch API शिकण्यासाठी आहे. Real photos साठी खूप जास्त data लागेल, आणि नंतर data augmentation सुद्धा, म्हणजे images flip, rotate किंवा crop करून जास्तीच्या training images बनवणे.
Ravindra Bagale's Tip – हिंदी
यह आसान synthetic task मुख्य रूप से PyTorch API सीखने के लिए है. Real photos के लिए बहुत ज़्यादा data चाहिए होगा, और बाद में data augmentation भी, यानी images को flip, rotate या crop करके extra training images बनाना.