Define a number of learnable parameters in Chainer

66 Views Asked by At

I want to define a number of learnable parameters in my model that are multiplied by the feature map in feedforward and updated when backpropagation. How can i implement this in the chainer framework?

1

There are 1 best solutions below

0
On

I read a little and found my answer. If you need to define a number of parameters in chainer that need to be learned, you should use chainer.links.Scale() function. for example chainer.links.Scale(axis=1,W_shape=(8,8)) W are the same parameters that are learnable in the network. If the feature map is x, W is multiplied by x and its updated in backpropagation.