gbure

Graph-based approaches on unsupervised relation extraction evaluated as a fewshot problem
git clone https://esimon.eu/repos/gbure.git
Log | Files | Refs | README | LICENSE

nonparametric.py (630B)


      1 from gbure.model.fewshot import Model
      2 from torch.optim import SGD as Optimizer
      3 
      4 
      5 max_epoch = 0
      6 dataset_name = "FewRel"
      7 graph_name = "T-REx"
      8 valid_name = "7def1330ba9527d6"
      9 shot = 1
     10 way = 5
     11 
     12 transformer_model = "bert-base-cased"
     13 post_transformer_layer = "none"
     14 learning_rate = 0
     15 accumulated_batch_size = 256
     16 
     17 neighborhood_size = 3
     18 linguistic_similarity = "dot"
     19 topological_weight = 0.2
     20 linguistic_weight = 1
     21 undefined_poison_whole_meta = True
     22 
     23 validation_metric = "accuracy"
     24 latent_metric_scale = "standard"
     25 latent_dot_mean = 1067.65
     26 latent_dot_std = 111.17
     27 
     28 # Implementation details
     29 seed = 0
     30 amp = True
     31 batch_size = 2
     32 workers = 2