mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-18 18:04:31 +08:00
Fix models.
This commit is contained in:
BIN
examples/benchmarks/GRU/csi300_gru_ts.pkl
Normal file
BIN
examples/benchmarks/GRU/csi300_gru_ts.pkl
Normal file
Binary file not shown.
@@ -56,7 +56,7 @@ task:
|
||||
hidden_size: 64
|
||||
num_layers: 2
|
||||
dropout: 0.0
|
||||
n_epochs: 2
|
||||
n_epochs: 200
|
||||
lr: 1e-3
|
||||
early_stop: 10
|
||||
batch_size: 800
|
||||
|
||||
BIN
examples/benchmarks/LSTM/csi300_lstm_ts.pkl
Normal file
BIN
examples/benchmarks/LSTM/csi300_lstm_ts.pkl
Normal file
Binary file not shown.
@@ -251,8 +251,7 @@ class GRU(Model):
|
||||
|
||||
self.logger.info("best score: %.6lf @ %d" % (best_score, best_epoch))
|
||||
self.GRU_model.load_state_dict(best_param)
|
||||
# torch.save(best_param, save_path)
|
||||
torch.save(best_param, '/home/lewwang/qlib/examples/benchmarks/GRU/csi300_gru_ts.pkl')
|
||||
torch.save(best_param, save_path)
|
||||
|
||||
if self.use_gpu:
|
||||
torch.cuda.empty_cache()
|
||||
|
||||
@@ -251,9 +251,7 @@ class LSTM(Model):
|
||||
|
||||
self.logger.info("best score: %.6lf @ %d" % (best_score, best_epoch))
|
||||
self.LSTM_model.load_state_dict(best_param)
|
||||
# torch.save(best_param, save_path)
|
||||
torch.save(best_param, '/home/lewwang/qlib/examples/benchmarks/LSTM/csi300_lstm_ts.pkl')
|
||||
|
||||
torch.save(best_param, save_path)
|
||||
|
||||
if self.use_gpu:
|
||||
torch.cuda.empty_cache()
|
||||
|
||||
Reference in New Issue
Block a user