Practical_NLP_in_PyTorch
Practical_NLP_in_PyTorch copied to clipboard
config
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?