Backends/SiaNet.Backend.MxNet/Interop/MXNet/CApi.cs
/// <summary>
/// This function will change the sym hanlde. To achieve function apply behavior, copy the symbol first before apply.
/// </summary>
/// <param name="sym">the symbol to apply</param>
/// <param name="name">the name of symbol</param>
/// <param name="num_args">number of arguments</param>
/// <param name="keys">the key of keyword args(optional)</param>
/// <param name="args">arguments to sym</param>
/// <returns>0 when success, -1 when failure happens</returns>
This function will change the sym hanlde. To achieve function apply behavior, copy the symbol first before apply.
This function will change the sym hanlde . To achieve function apply behavior copy the symbol first before apply .
[DllImport(NativeLibrary, CallingConvention = CallingConvention)]
        public static extern int MXSymbolCompose(SymbolHandle sym,
                                                 [MarshalAs(UnmanagedType.LPStr)] string name,
                                                 mx_uint num_args,
                                                 [In][MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPStr)] string[] keys,
                                                 SymbolHandle[] args);
[ DllImport ( NativeLibrary , CallingConvention = CallingConvention ) ] public static extern int MXSymbolCompose ( SymbolHandle sym , [ MarshalAs ( UnmanagedType . LPStr ) ] string name , mx_uint num_args , [ In ] [ MarshalAs ( UnmanagedType . LPArray , ArraySubType = UnmanagedType . LPStr ) ] string [ ] keys , SymbolHandle [ ] args ) ;
This function will change the sym hanlde.
This function will change the sym hanlde .
0 when success, -1 when failure happens
0 when success - 1 when failure happens
sym
SymbolHandle
the symbol to apply
the symbol to apply
string
[MarshalAs(UnmanagedType.LPStr)]
num_args
mx_uint
number of arguments
number of arguments
[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPStr)]
[In]
args
SymbolHandle[]
arguments to sym
arguments to sym
name
the name of symbol
the name of symbol
keys
the key of keyword args(optional)
the key of keyword args ( optional )