Skip to content

Commit a167506

Browse files
committed
Really slow
1 parent 6b7fbd5 commit a167506

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ batch_size: 8
55
lr : 1.0e-4
66
verbose: True
77
log: train_log.txt
8-
save_path:
8+
save_path: model.pt
99
load_path:

model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def __init__(self, n_classes, seq_length, batch_size):
1818
self.batch_size = batch_size
1919
self.hidden_dim = 100
2020
self.bidirectional = True
21-
self.lstm_layers = 2
21+
self.lstm_layers = 1
2222

2323
self.conv1 = nn.Conv2d(in_channels=3, out_channels=64, kernel_size=5, padding=1, stride=1)
2424
self.bn1 = nn.BatchNorm2d(64)
@@ -51,7 +51,7 @@ def __init__(self, n_classes, seq_length, batch_size):
5151
self.bn_res3 = nn.BatchNorm2d(512)
5252

5353
self.lstm = nn.LSTM(227328, self.hidden_dim, num_layers=self.lstm_layers, bias=True,
54-
bidirectional=self.bidirectional, dropout=0.5)
54+
bidirectional=self.bidirectional)
5555

5656
self.fc2 = nn.Linear(self.hidden_dim * self.directions, n_classes)
5757
# self.fc2 = nn.Linear(self.hidden_dim, n_classes)

train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def train(args: Namespace, seed: int = 0, verbose: bool = False) -> Tuple[List[D
179179
# Load dataset and create data loaders
180180
dataloaders = create_dataloader(args, verbose)
181181

182-
seq_length = 12
182+
seq_length = 15
183183

184184
if args.load_path is not None and Path(args.load_path).is_file():
185185
print("Loading model weights from: " + args.load_path)

0 commit comments

Comments
 (0)