Backends/SiaNet.Backend.MxNet/Interop/MXNet/CPredictApi.cs
/// <summary>
/// Set the input data of predictor.
/// </summary>
/// <param name="handle">The predictor handle.</param>
/// <param name="key">The name of input node to set. For feedforward net, this is "data".</param>
/// <param name="data">The pointer to the data to be set, with the shape specified in MXPredCreate.</param>
/// <param name="size">The size of data array, used for safety check.</param>
/// <returns>0 when success, -1 when failure.</returns>
Set the input data of predictor.
Set the input data of predictor .
[DllImport(NativeLibrary, CallingConvention = CallingConvention)]
        public static extern int MXPredSetInput(IntPtr handle,
                                                [MarshalAs(UnmanagedType.LPStr)] string key,
                                                float[] data,
                                                mx_uint size);
[ DllImport ( NativeLibrary , CallingConvention = CallingConvention ) ] public static extern int MXPredSetInput ( IntPtr handle , [ MarshalAs ( UnmanagedType . LPStr ) ] string key , float [ ] data , mx_uint size ) ;
Set the input data of predictor.
Set the input data of predictor .
0 when success, -1 when failure.
0 when success - 1 when failure .
handle
IntPtr
The predictor handle.
The predictor handle .
string
[MarshalAs(UnmanagedType.LPStr)]
data
float[]
The pointer to the data to be set, with the shape specified in MXPredCreate.
The pointer to the data to be set with the shape specified in MXPredCreate .
size
mx_uint
The size of data array, used for safety check.
The size of data array used for safety check .
key
The name of input node to set. For feedforward net, this is "data".
The name of input node to set . For feedforward net this is " data " .