Created
October 17, 2020 14:51
-
-
Save CleanPegasus/ab769bd29d48eec3633319a1e2c272bf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tensordash.torchdash import Torchdash | |
histories = Torchdash( | |
ModelName = '<YOUR_MODEL_NAME>', | |
email = '<YOUR_EMAIL_ID>', | |
password = '<YOUR PASSWORD>') | |
try: | |
for epoch in range(epochs): | |
losses = [] | |
for data in trainset: | |
X, y = data | |
net.zero_grad() | |
output = net(X.view(data_shape)) | |
loss = F.nll_loss(output, y) | |
loss.backward() | |
optimizer.step() | |
losses = np.asarray(losses) | |
histories.sendLoss(loss = np.mean(losses), epoch = epoch, total_epochs = epochs) // Add this line to your training loop | |
except: | |
histories.sendCrash() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment