Practical_NLP_in_PyTorch icon indicating copy to clipboard operation
Practical_NLP_in_PyTorch copied to clipboard

config

Open Mayar2009 opened this issue 4 years ago • 0 comments

class Config(dict): def init(self, **kwargs): super().init(**kwargs) for k, v in kwargs.items(): setattr(self, k, v)

def set(self, key, val):
    self[key] = val
    setattr(self, key, val)

config = Config( testing=False, bert_model_name="bert-base-uncased", max_lr=3e-5, epochs=1, use_fp16=False, bs=4, discriminative=False, max_seq_len=128, )

what is the importance of function set here , could you please give an example?

Mayar2009 avatar Aug 15 '20 16:08 Mayar2009