Пример #1
0
        protected virtual unsafe void UpdateLayerWeights(global::Org.Neuroph.Contrib.Matrixmlp.MatrixMlpLayer p0, double[] p1)
        {
            if (id_updateLayerWeights_Lorg_neuroph_contrib_matrixmlp_MatrixMlpLayer_arrayD == IntPtr.Zero)
            {
                id_updateLayerWeights_Lorg_neuroph_contrib_matrixmlp_MatrixMlpLayer_arrayD = JNIEnv.GetMethodID(class_ref, "updateLayerWeights", "(Lorg/neuroph/contrib/matrixmlp/MatrixMlpLayer;[D)V");
            }
            IntPtr native_p1 = JNIEnv.NewArray(p1);

            try {
                JValue *__args = stackalloc JValue [2];
                __args [0] = new JValue(p0);
                __args [1] = new JValue(native_p1);

                if (GetType() == ThresholdType)
                {
                    JNIEnv.CallVoidMethod(((global::Java.Lang.Object) this).Handle, id_updateLayerWeights_Lorg_neuroph_contrib_matrixmlp_MatrixMlpLayer_arrayD, __args);
                }
                else
                {
                    JNIEnv.CallNonvirtualVoidMethod(((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID(ThresholdClass, "updateLayerWeights", "(Lorg/neuroph/contrib/matrixmlp/MatrixMlpLayer;[D)V"), __args);
                }
            } finally {
                if (p1 != null)
                {
                    JNIEnv.CopyArray(native_p1, p1);
                    JNIEnv.DeleteLocalRef(native_p1);
                }
            }
        }
Пример #2
0
 static void n_SetOutputs_arrayD(IntPtr jnienv, IntPtr native__this, IntPtr native_p0)
 {
     global::Org.Neuroph.Contrib.Matrixmlp.MatrixMlpLayer __this = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Contrib.Matrixmlp.MatrixMlpLayer> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     double[] p0 = (double[])JNIEnv.GetArray(native_p0, JniHandleOwnership.DoNotTransfer, typeof(double));
     __this.SetOutputs(p0);
     if (p0 != null)
     {
         JNIEnv.CopyArray(p0, native_p0);
     }
 }
Пример #3
0
 static void n_UpdateLayerWeights_Lorg_neuroph_contrib_matrixmlp_MatrixMlpLayer_arrayD(IntPtr jnienv, IntPtr native__this, IntPtr native_p0, IntPtr native_p1)
 {
     global::Org.Neuroph.Contrib.Matrixmlp.MatrixMomentumBackpropagation __this = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Contrib.Matrixmlp.MatrixMomentumBackpropagation> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     global::Org.Neuroph.Contrib.Matrixmlp.MatrixMlpLayer p0 = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Contrib.Matrixmlp.MatrixMlpLayer> (native_p0, JniHandleOwnership.DoNotTransfer);
     double[] p1 = (double[])JNIEnv.GetArray(native_p1, JniHandleOwnership.DoNotTransfer, typeof(double));
     __this.UpdateLayerWeights(p0, p1);
     if (p1 != null)
     {
         JNIEnv.CopyArray(p1, native_p1);
     }
 }
Пример #4
0
 static void n_Sync(IntPtr jnienv, IntPtr native__this)
 {
     global::Org.Neuroph.Contrib.Matrixmlp.MatrixMlpLayer __this = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Contrib.Matrixmlp.MatrixMlpLayer> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     __this.Sync();
 }
Пример #5
0
 static int n_GetNeuronsCount(IntPtr jnienv, IntPtr native__this)
 {
     global::Org.Neuroph.Contrib.Matrixmlp.MatrixMlpLayer __this = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Contrib.Matrixmlp.MatrixMlpLayer> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     return(__this.NeuronsCount);
 }
Пример #6
0
 static IntPtr n_GetWeights(IntPtr jnienv, IntPtr native__this)
 {
     global::Org.Neuroph.Contrib.Matrixmlp.MatrixMlpLayer __this = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Contrib.Matrixmlp.MatrixMlpLayer> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     return(JNIEnv.NewArray(__this.GetWeights()));
 }
Пример #7
0
 static IntPtr n_GetTransferFunction(IntPtr jnienv, IntPtr native__this)
 {
     global::Org.Neuroph.Contrib.Matrixmlp.MatrixMlpLayer __this = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Contrib.Matrixmlp.MatrixMlpLayer> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     return(JNIEnv.ToLocalJniHandle(__this.TransferFunction));
 }
Пример #8
0
 static void n_SetPreviousLayer_Lorg_neuroph_contrib_matrixmlp_MatrixLayer_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0)
 {
     global::Org.Neuroph.Contrib.Matrixmlp.MatrixMlpLayer __this = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Contrib.Matrixmlp.MatrixMlpLayer> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     global::Org.Neuroph.Contrib.Matrixmlp.IMatrixLayer   p0     = (global::Org.Neuroph.Contrib.Matrixmlp.IMatrixLayer)global::Java.Lang.Object.GetObject <global::Org.Neuroph.Contrib.Matrixmlp.IMatrixLayer> (native_p0, JniHandleOwnership.DoNotTransfer);
     __this.PreviousLayer = p0;
 }