mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-09 11:32:07 +08:00
updated args
This commit is contained in:
@@ -78,7 +78,7 @@ class ExampleModel(RootModule):
|
||||
output = OrderedDict({
|
||||
'loss_val': loss_val,
|
||||
})
|
||||
return torch.tensor(4)
|
||||
return output
|
||||
|
||||
def validation_step(self, data_batch, batch_i):
|
||||
"""
|
||||
@@ -102,7 +102,7 @@ class ExampleModel(RootModule):
|
||||
'loss_val': loss_val,
|
||||
'val_acc': val_acc,
|
||||
})
|
||||
return torch.tensor(4)
|
||||
return output
|
||||
|
||||
|
||||
def validation_end(self, outputs):
|
||||
|
||||
@@ -72,9 +72,9 @@ def parallel_apply(modules, inputs, kwargs_tup=None, devices=None):
|
||||
# ---------------
|
||||
# CHANGE
|
||||
if module.training:
|
||||
return module.training_step(*input, **kwargs)
|
||||
output = module.training_step(*input, **kwargs)
|
||||
else:
|
||||
return module.validation_step(*input, **kwargs)
|
||||
output = module.validation_step(*input, **kwargs)
|
||||
# ---------------
|
||||
|
||||
with lock:
|
||||
|
||||
Reference in New Issue
Block a user