Exemple #1
0
        // ReLU activation function

        public static void Relu(Tensor input, Tensor output)
        {
            output.Reset(input.Shape);
            GpuBackend.InvokeActivation("Relu", input, 0, output);
        }
Exemple #2
0
        // ReLU activation function

        public static void Relu(Tensor input, Tensor output)
        {
            GpuBackend.InvokeActivation("Relu", input, 0, output);
        }
Exemple #3
0
        // Leaky ReLU activation function

        public static void LeakyRelu(Tensor input, float alpha, Tensor output)
        {
            output.Reset(input.Shape);
            GpuBackend.InvokeActivation("LeakyRelu", input, alpha, output);
        }
Exemple #4
0
        // Tanh activation function

        public static void Tanh(Tensor input, Tensor output)
        {
            GpuBackend.InvokeActivation("Tanh", input, 0, output);
        }