ebagdasa / backdoors101

Backdoors Framework for Deep Learning and Federated Learning. A light-weight tool to conduct your research on backdoors.
MIT License
335 stars 82 forks source link

AttributeError: 'NoneType' object has no attribute 'to' #2

Closed hsx479 closed 3 years ago

hsx479 commented 3 years ago

When i try to run training with ‘python training.py --name mnist --params configs/mnist_params.yaml --commit none’, the following error occurs:

Traceback (most recent call last): File "training.py", line 119, in helper = Helper(params) File "D:\lab\backdoors101\helper.py", line 40, in init self.make_task() File "D:\lab\backdoors101\helper.py", line 64, in make_task self.task = task_class(self.params) File "D:\lab\backdoors101\tasks\task.py", line 43, in init self.init_task() File "D:\lab\backdoors101\tasks\task.py", line 49, in init_task self.model = self.model.to(self.params.device) AttributeError: 'NoneType' object has no attribute 'to'

Then I find that the function build_model() in class Task is 'NotImplemented'. Does it mean that i have to make some changes to the code before i use 'python training.py --name mnist --params configs/mnist_params.yaml --commit none'?

ebagdasa commented 3 years ago

yep, fixed. try again.