9334d336f027e8b90d5751458c7794f8a0167559,thinc/shims/mxnet.py,MXNetShim,finish_update,#MXNetShim#Any#,59
Before Change
def finish_update(self, optimizer):
if self._optimizer is None:
self._optimizer, self._trainer = self._create_optimizer(optimizer)
if getattr(optimizer, "grad_clip", None):
ctx = mx.current_context()
grads = [
After Change
def finish_update(self, optimizer: Optimizer):
for value in self._model.collect_params().values():
grad = cast(FloatsXd, mxnet2xp(value.grad()))
param = cast(FloatsXd, mxnet2xp(value.data()))
param, _ = optimizer((value.name, value.name), param, grad)
value.set_data(xp2mxnet(param))
def copy(self, ctx: "mx.context.Context" = None):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: explosion/thinc
Commit Name: 9334d336f027e8b90d5751458c7794f8a0167559
Time: 2020-05-11
Author: justin@dujardinconsulting.com
File Name: thinc/shims/mxnet.py
Class Name: MXNetShim
Method Name: finish_update
Project Name: biolab/orange3
Commit Name: 9f488be9e08bb08a3aeb1346d52d981a2d3f1ca9
Time: 2015-10-30
Author: tankovesna@hotmail.com
File Name: Orange/canvas/report/owreport.py
Class Name: OWReport
Method Name: get_html_img
Project Name: biolab/orange3
Commit Name: 9296313084c86e7d2290862188d13487274468b6
Time: 2015-12-04
Author: tankovesna@hotmail.com
File Name: Orange/canvas/report/owreport.py
Class Name: OWReport
Method Name: get_html_img