Python AttributeError:Tensor没有属性子级

Python AttributeError:Tensor没有属性子级,python,deep-learning,Python,Deep Learning,pytorch和pysyft的版本 !pip install -q torch==1.8.0 !pip install -q torchvision==0.5.0 !pip install syft==0.2.3 训练模型时获取错误 model = train_model_federated(model, criterion, optimizer, exp_lr_scheduler, num_epochs=1) Epoch 0/0 at 09:18:08 PM (17 Apr 2021) -

pytorch和pysyft的版本

!pip install -q torch==1.8.0
!pip install -q torchvision==0.5.0
!pip install syft==0.2.3
训练模型时获取错误

model = train_model_federated(model, criterion, optimizer, exp_lr_scheduler, num_epochs=1)

Epoch 0/0 at 09:18:08 PM (17 Apr 2021)
----------
/usr/local/lib/python3.7/dist-packages/torch/optim/lr_scheduler.py:122: UserWarning: Detected call of `lr_scheduler.step()` before `optimizer.step()`. In PyTorch 1.1.0 and later, you should call them in the opposite order: `optimizer.step()` before `lr_scheduler.step()`.  Failure to do this will result in PyTorch skipping the first value of the learning rate schedule. See more details at https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate
  "https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate", UserWarning)
train Loss: 0.1671 Acc: 0.9354
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-16-59cb3373c941> in <module>()
----> 1 model = train_model_federated(model, criterion, optimizer, exp_lr_scheduler, num_epochs=1)

1 frames
/usr/local/lib/python3.7/dist-packages/syft/frameworks/torch/tensors/interpreters/native.py in get(self, inplace, user, reason, *args, **kwargs)
    573 
    574         # If it is a local tensor/chain, we don't need to verify permissions
--> 575         if not isinstance(self.child, syft.PointerTensor):
    576             tensor = self.child.get(*args, **kwargs)
    577         else:  # Remote tensor/chain
AttributeError: 'Tensor' object has no attribute 'child'
model=train\u model\u federated(模型、标准、优化器、exp\u lr\u调度器、num\u epochs=1)
纪元0/0于晚上09:18:08(2021年4月17日)
----------
/usr/local/lib/python3.7/dist packages/torch/optim/lr_scheduler.py:122:UserWarning:检测到调用“optimizer.step()”之前的“lr_scheduler.step()”。在PyTorch 1.1.0及更高版本中,应该以相反的顺序调用它们:`optimizer.step()`在`lr_scheduler.step()之前。否则将导致PyTorch跳过学习率计划的第一个值。有关更多详细信息,请参阅https://pytorch.org/docs/stable/optim.html#how-调整学习率
"https://pytorch.org/docs/stable/optim.html#how-调整学习速度”,用户警告)
列车损失:0.1671 Acc:0.9354
---------------------------------------------------------------------------
AttributeError回溯(最近一次呼叫上次)
在()
---->1个模型=列车模型联合(模型、标准、优化器、exp\u lr\u调度器、num\u epochs=1)
1帧
/get中的usr/local/lib/python3.7/dist-packages/syft/frameworks/torch/tensors/translators/native.py(self、inplace、user、reason、*args、**kwargs)
573
574#如果是局部张量/链,则不需要验证权限
-->575如果不存在(self.child、syft.pointer传感器):
576张量=self.child.get(*args,**kwargs)
577其他:#远程张量/链
AttributeError:“Tensor”对象没有属性“child”
你知道这个错误吗