MCPcopy Create free account
hub / github.com/apache/singa / get_params

Method get_params

test/python/test_model.py:357–367  ·  view source on GitHub ↗
(self, model)

Source from the content-addressed store, hash-verified

355 self.target = Tensor(data=self.label, device=dev)
356
357 def get_params(self, model):
358 params = model.get_params()
359 self.w0 = params['linear1.W']
360 self.b0 = params['linear1.b']
361 self.w1 = params['linear2.W']
362 self.b1 = params['linear2.b']
363
364 self.W0 = tensor.to_numpy(self.w0)
365 self.B0 = tensor.to_numpy(self.b0)
366 self.W1 = tensor.to_numpy(self.w1)
367 self.B1 = tensor.to_numpy(self.b1)
368
369 def numpy_forward(self, inputs):
370 self.x1 = np.matmul(inputs, self.W0)

Callers 2

_forward_helperMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected