Created
March 20, 2021 21:32
-
-
Save adamoudad/bbaf0b3a5b5d609c5db06f1a7e86ddb9 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
model = BiLSTM(input_dim, embedding_dim, hidden_dim) | |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu") | |
criterion = nn.BCELoss().to(device) | |
optimizer = torch.optim.Adam(model.parameters()) | |
model.to(device) | |
batch_history = { | |
"loss": [], | |
"accuracy": [] | |
} | |
epoch_history = { | |
"loss": [], | |
"accuracy": [], | |
"val_loss": [], | |
"val_accuracy": [], | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
initialize_training_imdb_pytorch.py