mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-17 17:34:35 +08:00
Update pytorch_nn
This commit is contained in:
@@ -193,7 +193,6 @@ class DNNModelPytorch(Model):
|
|||||||
w_val_auto = w_val_auto.cuda()
|
w_val_auto = w_val_auto.cuda()
|
||||||
|
|
||||||
for step in range(self.max_steps):
|
for step in range(self.max_steps):
|
||||||
self.logger.info(step)
|
|
||||||
if stop_steps >= self.early_stop_rounds:
|
if stop_steps >= self.early_stop_rounds:
|
||||||
if verbose:
|
if verbose:
|
||||||
self.logger.info("\tearly stop")
|
self.logger.info("\tearly stop")
|
||||||
@@ -201,7 +200,6 @@ class DNNModelPytorch(Model):
|
|||||||
loss = AverageMeter()
|
loss = AverageMeter()
|
||||||
self.dnn_model.train()
|
self.dnn_model.train()
|
||||||
self.train_optimizer.zero_grad()
|
self.train_optimizer.zero_grad()
|
||||||
self.logger.info("INIT")
|
|
||||||
|
|
||||||
choice = np.random.choice(train_num, self.batch_size)
|
choice = np.random.choice(train_num, self.batch_size)
|
||||||
x_batch_auto = x_train_values[choice]
|
x_batch_auto = x_train_values[choice]
|
||||||
|
|||||||
Reference in New Issue
Block a user