fix nasnet GradOperation

This commit is contained in:
panfengfeng 2020-10-15 20:11:33 +08:00
parent fa37f8fde3
commit 5537ec8d92
1 changed files with 1 additions and 1 deletions

View File

@ -911,7 +911,7 @@ class NASNetAMobileTrainOneStepWithClipGradient(nn.Cell):
self.network.add_flags(defer_inline=True) self.network.add_flags(defer_inline=True)
self.weights = optimizer.parameters self.weights = optimizer.parameters
self.optimizer = optimizer self.optimizer = optimizer
self.grad = C.GradOperation('grad', get_by_list=True, sens_param=True) self.grad = C.GradOperation(get_by_list=True, sens_param=True)
self.hyper_map = C.HyperMap() self.hyper_map = C.HyperMap()
self.sens = sens self.sens = sens
self.reducer_flag = False self.reducer_flag = False