Beispiel #1
0
        public override KerasSymbol[] Invoke(KerasSymbol[] inputs, FuncArgs kwargs = null)
        {
            List <KerasSymbol> result = new List <KerasSymbol>();

            foreach (var input in inputs)
            {
                var output = K.Dot(input, this.kernel);
                if (this.use_bias)
                {
                    output = K.BiasAdd(output, this.bias, data_format: "channels_last");
                }

                result.Add(output);
            }

            if (this.activation != null)
            {
                return(this.activation.Invoke(result.ToArray()));
            }

            return(result.ToArray());
        }