add pytorch exercise

This commit is contained in:
piotr6789 2021-04-25 23:49:57 +02:00
parent da8ea72364
commit 254da57d4b

View File

@ -48,7 +48,7 @@ criterion = torch.nn.BCELoss(reduction='mean')
optimizer = torch.optim.SGD(model.parameters(), lr = learning_rate)
for epoch in range(num_epochs):
print ("Epoch #",epoch)
print ("Epoch - ",epoch)
model.train()
optimizer.zero_grad()
# Forward pass