Browse Source

修正 _TruncatedDataLoader 1

tags/1.0.0beta2
YWMditto 2 years ago
parent
commit
e86645380a
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      fastNLP/core/controllers/utils/utils.py

+ 3
- 3
fastNLP/core/controllers/utils/utils.py View File

@@ -132,9 +132,9 @@ class _TruncatedDataLoader:
def __getattr__(self, item):
return getattr(self.dataloader, item)

def __setattr__(self, key, value):
# 添加该函数使得在进行实验性训练或者评测时,用户对于 trainer.dataloader 的感觉和正常训练完全一样;
setattr(self.dataloader, key, value)
# def __setattr__(self, key, value):
# # 添加该函数使得在进行实验性训练或者评测时,用户对于 trainer.dataloader 的感觉和正常训练完全一样;
# setattr(self.dataloader, key, value)


def check_evaluate_every(evaluate_every):


Loading…
Cancel
Save