From 80690d56f8b13c239b024165f96ef4a135320087 Mon Sep 17 00:00:00 2001 From: Aladdin Persson Date: Wed, 24 Mar 2021 22:07:20 +0100 Subject: [PATCH] small revisions to code examples --- ML/Pytorch/Basics/pytorch_rnn_gru_lstm.py | 1 - ML/Pytorch/Basics/pytorch_simple_CNN.py | 1 - ML/Pytorch/Basics/pytorch_simple_fullynet.py | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/ML/Pytorch/Basics/pytorch_rnn_gru_lstm.py b/ML/Pytorch/Basics/pytorch_rnn_gru_lstm.py index 489caeb..f12d855 100644 --- a/ML/Pytorch/Basics/pytorch_rnn_gru_lstm.py +++ b/ML/Pytorch/Basics/pytorch_rnn_gru_lstm.py @@ -130,7 +130,6 @@ for epoch in range(num_epochs): # gradient descent update step/adam step optimizer.step() - # Check accuracy on training & test to see how good our model def check_accuracy(loader, model): num_correct = 0 diff --git a/ML/Pytorch/Basics/pytorch_simple_CNN.py b/ML/Pytorch/Basics/pytorch_simple_CNN.py index 45c94e1..d18d948 100644 --- a/ML/Pytorch/Basics/pytorch_simple_CNN.py +++ b/ML/Pytorch/Basics/pytorch_simple_CNN.py @@ -94,7 +94,6 @@ for epoch in range(num_epochs): # gradient descent or adam step optimizer.step() - # Check accuracy on training & test to see how good our model def check_accuracy(loader, model): num_correct = 0 diff --git a/ML/Pytorch/Basics/pytorch_simple_fullynet.py b/ML/Pytorch/Basics/pytorch_simple_fullynet.py index 4e08a9d..fa0a9f4 100644 --- a/ML/Pytorch/Basics/pytorch_simple_fullynet.py +++ b/ML/Pytorch/Basics/pytorch_simple_fullynet.py @@ -95,7 +95,7 @@ for epoch in range(num_epochs): optimizer.step() -# Check accuracy on training & test to see how good our model is +# Check accuracy on training & test to see how good our model def check_accuracy(loader, model): num_correct = 0 num_samples = 0