added test model to do also

This commit is contained in:
William Falcon
2019-08-07 11:47:05 -04:00
parent 7812a1339a
commit 16e5093805
2 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -232,7 +232,7 @@ class LightningTestModel(LightningModule):
return self.__dataloader(train=False)
@staticmethod
def add_model_specific_args(parent_parser, root_dir):
def add_model_specific_args(parent_parser, root_dir): # pragma: no cover
"""
Parameters you define here will be available to your model through self.hparams
:param parent_parser:
+6 -2
View File
@@ -681,10 +681,14 @@ def get_hparams(continue_training=False, hpc_exp_number=0):
return hparams
def get_model():
def get_model(use_test_model=False):
# set up model with these hyperparams
hparams = get_hparams()
model = LightningTemplateModel(hparams)
if use_test_model:
model = LightningTestModel(hparams)
else:
model = LightningTemplateModel(hparams)
return model, hparams