Backends/SiaNet.Backend.MxNet/Interop/MXNet/CApi.cs
/// <summary>
/// infer shape of unknown input shapes given the known one.
/// <para>The shapes are packed into a CSR matrix represented by arg_ind_ptr and arg_shape_data</para>
/// <para>The call will be treated as a kwargs call if key != nullptr or num_args==0, otherwise it is positional.</para>
/// </summary>
/// <param name="sym">symbol handle</param>
/// <param name="num_args">numbe of input arguments.</param>
/// <param name="keys">the key of keyword args (optional)</param>
/// <param name="arg_ind_ptr">the head pointer of the rows in CSR</param>
/// <param name="arg_shape_data">the content of the CSR</param>
/// <param name="in_shape_size">sizeof the returning array of in_shapes</param>
/// <param name="in_shape_ndim">returning array of shape dimensions of eachs input shape.</param>
/// <param name="in_shape_data">returning array of pointers to head of the input shape.</param>
/// <param name="out_shape_size">sizeof the returning array of out_shapes</param>
/// <param name="out_shape_ndim">returning array of shape dimensions of eachs input shape.</param>
/// <param name="out_shape_data">returning array of pointers to head of the input shape.</param>
/// <param name="aux_shape_size">sizeof the returning array of aux_shapes</param>
/// <param name="aux_shape_ndim">returning array of shape dimensions of eachs auxiliary shape.</param>
/// <param name="aux_shape_data">returning array of pointers to head of the auxiliary shape.</param>
/// <param name="complete">whether infer shape completes or more information is needed.</param>
/// <returns>0 when success, -1 when failure happens</returns>
infer shape of unknown input shapes given the known one.
The shapes are packed into a CSR matrix represented by arg_ind_ptr and arg_shape_dataThe call will be treated as a kwargs call if key != nullptr or num_args==0, otherwise it is positional.
infer shape of unknown input shapes given the known one . The shapes are packed into a CSR matrix represented by arg_ind_ptr and arg_shape_dataThe call will be treated as a kwargs call if key ! = nullptr or num_args == 0 otherwise it is positional .
[DllImport(NativeLibrary, CallingConvention = CallingConvention)]
        public static extern unsafe int MXSymbolInferShape(SymbolHandle sym,
                                                           mx_uint num_args,
                                                           [In][MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPStr)] string[] keys,
                                                           mx_uint[] arg_ind_ptr,
                                                           mx_uint[] arg_shape_data,
                                                           mx_uint* in_shape_size,
                                                           mx_uint** in_shape_ndim,
                                                           mx_uint*** in_shape_data,
                                                           out mx_uint out_shape_size,
                                                           out mx_uint* out_shape_ndim,
                                                           out mx_uint** out_shape_data,
                                                           out mx_uint aux_shape_size,
                                                           out mx_uint* aux_shape_ndim,
                                                           out mx_uint** aux_shape_data,
                                                           out int complete);
[ DllImport ( NativeLibrary , CallingConvention = CallingConvention ) ] public static extern unsafe int MXSymbolInferShape ( SymbolHandle sym , mx_uint num_args , [ In ] [ MarshalAs ( UnmanagedType . LPArray , ArraySubType = UnmanagedType . LPStr ) ] string [ ] keys , mx_uint [ ] arg_ind_ptr , mx_uint [ ] arg_shape_data , mx_uint * in_shape_size , mx_uint * * in_shape_ndim , mx_uint * * * in_shape_data , out mx_uint out_shape_size , out mx_uint * out_shape_ndim , out mx_uint * * out_shape_data , out mx_uint aux_shape_size , out mx_uint * aux_shape_ndim , out mx_uint * * aux_shape_data , out int complete ) ;
infer shape of unknown input shapes given the known one.
infer shape of unknown input shapes given the known one .
0 when success, -1 when failure happens
0 when success - 1 when failure happens
sym
SymbolHandle
None
num_args
mx_uint
numbe of input arguments.
numbe of input arguments .
[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPStr)]
[In]
arg_ind_ptr
mx_uint[]
the head pointer of the rows in CSR
the head pointer of the rows in CSR
arg_shape_data
mx_uint[]
the content of the CSR
the content of the CSR
in_shape_size
mx_uint*
sizeof the returning array of in_shapes
sizeof the returning array of in_shapes
in_shape_ndim
mx_uint**
returning array of shape dimensions of eachs input shape.
returning array of shape dimensions of eachs input shape .
in_shape_data
mx_uint***
returning array of pointers to head of the input shape.
returning array of pointers to head of the input shape .
mx_uint
out
mx_uint*
out
mx_uint**
out
int
out
keys
the key of keyword args (optional)
the key of keyword args ( optional )
out_shape_size
sizeof the returning array of out_shapes
sizeof the returning array of out_shapes
out_shape_ndim
returning array of shape dimensions of eachs input shape.
returning array of shape dimensions of eachs input shape .
out_shape_data
returning array of pointers to head of the input shape.
returning array of pointers to head of the input shape .
aux_shape_size
sizeof the returning array of aux_shapes
sizeof the returning array of aux_shapes
aux_shape_ndim
returning array of shape dimensions of eachs auxiliary shape.
returning array of shape dimensions of eachs auxiliary shape .
aux_shape_data
returning array of pointers to head of the auxiliary shape.
returning array of pointers to head of the auxiliary shape .
complete
whether infer shape completes or more information is needed.
whether infer shape completes or more information is needed .