mlp_grid_search_eval

mlp_grid_search_eval(name, data_root, embedding_file, results_file, dist=False, model_args=None, train_args=None, mmap_edges=None, mmap_features=None, random_split=False, use_tmp=False, model='mlp', restrict_lcc=False, device=None, runs=None)[source]

Run grid search over MLP parameters

Parameters:
  • name – Name of data set

  • data_root – Root folder for downloaded data

  • embedding_file – File containing embedding coordinates (npy)

  • results_file – File to store search results (json)

  • train_args – grid of training arguments default ({‘batch_size’: (100000,), ‘num_epochs’: (1000,), ‘patience’: (20,), ‘lr’: (0.01, 0.001, 0.0001)})

  • mmap_features – if True use mmap to load features

  • use_tmp – if True and using mmap, copy features to temporary storage

  • model_args – grid of model parameters

  • (default – kwargs = {‘hidden_dim’: (128, 256, 512, 1024), ‘n_layers’: (2, 3, 4), ‘dropout’: (0, 0.25, 0.5), ‘batch_norm’: (True,)})

Returns: dictionary of best model parameters