Skip to content

Commit 3949d1b

Browse files
committed
add a note: please use only 1 gpu to run LSTM, pytorch/pytorch#21108
1 parent 80e49d4 commit 3949d1b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/scsn_polarity_lstm_training.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
# Prepare dataset
3434
dsets.set_memory_limit(10 * 1024 ** 3) # first number is GB
3535
# dset = dsets.Wenchuan(path='/home/qszhai/temp_project/deep_learning_course_project/cpic', download=False,sample_transform=waveform_transform)
36-
dset = dsets.Wenchuan(path='/home/qszhai/temp_project/deep_learning_course_project/first_motion_polarity/scsn_data/train_npy', download=False, sample_transform=waveform_transform)
36+
dset = dsets.SCSN_polarity(path='/home/qszhai/temp_project/deep_learning_course_project/first_motion_polarity/scsn_data/train_npy', download=False, sample_transform=waveform_transform)
3737

3838
# Split datasets into training and validation
3939
train_length = int(len(dset) * 0.8)
@@ -45,7 +45,8 @@
4545
val_loader = DataLoader(val_set, batch_size=10000, shuffle=False, num_workers=4)
4646

4747
# Prepare trainer
48-
#trainer = Trainer(cpic(), CrossEntropyLoss(), lr=0.1)
48+
# trainer = Trainer(cpic(), CrossEntropyLoss(), lr=0.1)
49+
# note: please use only 1 gpu to run LSTM, https://github.com/pytorch/pytorch/issues/21108
4950
model_conf = {"hidden_size": 64}
5051
plt = polarity(**model_conf)
5152
trainer = Trainer(plt, CrossEntropyLoss(), lr=0.001)

0 commit comments

Comments
 (0)