Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

epochs? #1

Open
tfor opened this issue Jun 11, 2024 · 0 comments
Open

epochs? #1

tfor opened this issue Jun 11, 2024 · 0 comments

Comments

@tfor
Copy link

tfor commented Jun 11, 2024

In mnist.py there is this for loop (please pardon my possibly outdated verbiage as I started programming in Pascal and FORTRAN) given below between the lines of ====.

But epochs is not defined error is being thrown.

To what value should epochs be set?

===================================================================================
for epoch in range(epochs):
train_loss.reset_states()
val_loss.reset_states()
val_accuracy.reset_states()

# Existing training and validation loop here ...

# Append metrics after each epoch
epoch_train_loss.append(train_loss.result().numpy())
epoch_val_loss.append(val_loss.result().numpy())
epoch_val_accuracy.append(val_accuracy.result().numpy())

print(f'Epoch {epoch + 1}, Train Loss: {train_loss.result():.4f}, Validation Loss: {val_loss.result():.4f}, Validation Accuracy: {val_accuracy.result():.4f}')

===================================================================================

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant