public Swish(int[] betaShape, double beta = 1.0) { PyObject[] beta_shape = new PyObject[betaShape.Length]; for (int i = 0; i < betaShape.Length; i++) { beta_shape[i] = betaShape[i]; } _swish = Chainer.Links["Swish"].Call(PyTuple.Pack(beta_shape), beta); _swish["cleargrads"].Call(); }
public Deconvolution2D(int inChannels, int outChannels, PyArray <T> kSize, PyArray <T> stride, PyArray <T> pad, bool nobias, PyObject[] outSize, PyArray <T> initialW, PyArray <T> initialBias) { _deconvolution2D = Chainer.Links["Deconvolution2D"].Call(inChannels, outChannels, kSize, stride, pad, nobias, PyTuple.Pack(outSize), initialW, initialBias); _deconvolution2D["cleargrads"].Call(); }
public PyObject Forward(params PyObject[] x) { return(_concat.Call(PyTuple.Pack(x), axis)); }