Skip to content

Commit

Permalink
Update number format and precision in training progress message
Browse files Browse the repository at this point in the history
  • Loading branch information
rahmans1 authored Jan 12, 2024
1 parent 7398a0b commit c4e1703
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion benchmarks/roman_pots/train_dense_neural_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def train_model(input_tensor, target_tensor, model, num_epochs, learning_rate):

# Print progress
if (epoch + 1) % 10 == 0:
print(f'Epoch [{epoch+1}/{num_epochs}], Loss: {loss.item():.3e}')
print("Epoch "+str(epoch+1)+"/"+str(num_epochs)+", Loss: "+"{0:0.10f}".format(loss.item()))

# Plot the loss values
plt.plot(range(1, num_epochs+1), losses)
Expand Down

0 comments on commit c4e1703

Please sign in to comment.