def update_one(self, param, state):
"""Updates a parameter based on the corresponding gradient and state.
This method calls appropriate one from :meth:`update_param_cpu` or
:meth:`update_param_gpu`.
Args:
param (~chainer.Variable): Parameter variable.
state (dict): State dictionary.
"""
if isinstance(param.data, numpy.ndarray):
self.update_one_cpu(param, state)
else:
self.update_one_gpu(param, state)
评论列表
文章目录