Esempio n. 1
0
        public override (NDArrayOrSymbol, NDArrayOrSymbol[]) HybridForward(NDArrayOrSymbol x,
                                                                           params NDArrayOrSymbol[] args)
        {
            var(output, states) = BaseCell.Call(x, args);
            if (x.IsNDArray)
            {
                output = nd.ElemwiseAdd(output, x);
            }
            else
            {
                output = sym.ElemwiseAdd(output, x, $"t{_counter}_fwd");
            }

            return(output, states);
        }