Skip to content

Instantly share code, notes, and snippets.

View 0707jim's full-sized avatar

jimbarak mikat 0707jim

  • MiccaFam
  • United States
View GitHub Profile
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 = {