Skip to content
Snippets Groups Projects
Commit 3e852835 authored by Yandi's avatar Yandi
Browse files

non-vanishing RNN

parent 9767cada
Branches
No related tags found
1 merge request!1Master into main
......@@ -56,8 +56,8 @@ BidirectionalLSTM:
RNN:
HiddenSize: 35
NumLayers: 4
NumFFN: 15
NumLayers: 2
NumFFN: 2
Dropout: 0.2
Initialization: None
......
No preview for this file type
......@@ -120,14 +120,14 @@ if __name__ == "__main__":
wandb.watch(network, log_freq = log_freq)
for t in range(cfg["Training"]["Epochs"]):
logging.info("Epoch {}".format(t))
print("Epoch {}".format(t))
train(args, network, train_loader, f_loss, optimizer, device, log_interval)
val_loss = test.test(network, valid_loader, f_loss, device)
network_checkpoint.update(val_loss)
logging.info(" Validation : Loss : {:.4f}".format(val_loss))
print(" Validation : Loss : {:.4f}".format(val_loss))
if not args.no_wandb:
wandb.log({"val_loss": val_loss})
......
......@@ -35,6 +35,10 @@ def test(model, loader, f_loss, device):
# Compute the forward pass, i.e. the scores for each input image
outputs = model(inputs)
print("Validation inputs :")
print(inputs)
print("Validation outputs :")
print(outputs)
# We accumulate the exact number of processed samples
N += inputs.shape[0]
......
No preview for this file type
No preview for this file type
run-20230203_215737-zxchwf43/logs/debug-internal.log
\ No newline at end of file
run-20230203_233455-ujner2cx/logs/debug-internal.log
\ No newline at end of file
run-20230203_215737-zxchwf43/logs/debug.log
\ No newline at end of file
run-20230203_233455-ujner2cx/logs/debug.log
\ No newline at end of file
run-20230203_215737-zxchwf43
\ No newline at end of file
run-20230203_233455-ujner2cx
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment