Exemple #1
0
        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();
        }
Exemple #2
0
 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();
 }
Exemple #3
0
 public PyObject Forward(params PyObject[] x)
 {
     return(_concat.Call(PyTuple.Pack(x), axis));
 }