examples/pytorch_hpc_example.py
def train(hparams, *args):
    """Train your awesome model.

    :param hparams: The arguments to run the model with.
    """
    # Initialize experiments and track all the hyperparameters
    exp = Experiment(
        name=hparams.test_tube_exp_name,
        # Location to save the metrics.
        save_dir=hparams.log_path,
        autosave=False,
    )
    exp.argparse(hparams)

    # Pretend to train.
    x = torch.rand((1, hparams.x_val))
    for train_step in range(0, 100):
        y = torch.rand((hparams.x_val, 1))
        out = x.mm(y)
        exp.log({'fake_err': out.item()})

    # Save exp when .
    exp.save()
def train(hparams, *args):
    """Train your awesome model.

    :param hparams: The arguments to run the model with.
    """
    # Initialize experiments and track all the hyperparameters
    exp = Experiment(
        name=hparams.test_tube_exp_name,
        # Location to save the metrics.
        save_dir=hparams.log_path,
        autosave=False,
    )
    exp.argparse(hparams)

    # Pretend to train.
    x = torch.rand((1, hparams.x_val))
    for train_step in range(0, 100):
        y = torch.rand((hparams.x_val, 1))
        out = x.mm(y)
        exp.log({'fake_err': out.item()})

    # Save exp when .
    exp.save()
def train ( hparams , * args ) : # Initialize experiments and track all the hyperparameters exp = Experiment ( name = hparams . test_tube_exp_name , # Location to save the metrics. save_dir = hparams . log_path , autosave = False , ) exp . argparse ( hparams ) # Pretend to train. x = torch . rand ( ( 1 , hparams . x_val ) ) for train_step in range ( 0 , 100 ) : y = torch . rand ( ( hparams . x_val , 1 ) ) out = x . mm ( y ) exp . log ( { 'fake_err' : out . item ( ) } ) # Save exp when . exp . save ( )
Train your awesome model.

    :param hparams: The arguments to run the model with.
Train your awesome model .