Ejemplo n.º 1
0
        '--shared_transformer',
        str(shared_transformer),
        '--patch_center',
        'mean',
        '--training_order',
        'random_shape_consecutive',
        '--use_point_stn',
        str(1),
        '--uniform_subsample',
        str(0),
        '--outputs',
    ]
    train_params += features

    # train model on GT data with multiple query points per patch
    train_opt = points_to_surf_train.parse_arguments(train_params)
    points_to_surf_train.points_to_surf_train(train_opt)

    valsets = [
        'abc_minimal',
    ]
    for valset in valsets:
        # validate model
        in_dir_val = os.path.join(base_dir, valset)
        out_dir_val = os.path.join('results', model_name, valset)
        res_dir_eval = os.path.join(out_dir_val, 'eval')
        eval_params = [
            '--indir',
            in_dir_val,
            '--outdir',
            out_dir_val,
Ejemplo n.º 2
0
from source import points_to_surf_train

# When you see this error:
# 'Expected more than 1 value per channel when training...' which is raised by the BatchNorm1d layer
# for multi-gpu, use a batch size that can't be divided by the number of GPUs
# for single-gpu, use a straight batch size
# see https://github.com/pytorch/pytorch/issues/2584
# see https://forums.fast.ai/t/understanding-code-error-expected-more-than-1-value-per-channel-when-training/9257/12


def full_train(opt):

    points_to_surf_train.points_to_surf_train(opt)


if __name__ == '__main__':

    # train model on GT data with multiple query points per patch
    full_train(opt=points_to_surf_train.parse_arguments())

    print('MeshNet training is finished!')