SiaNet/Parameter.cs
/// <summary>
/// Create an instance of parameter with tensor data.
/// </summary>
/// <param name="data">The tensor data to build the parameter.</param>
/// <param name="name">The name of the parameter.</param>
/// <returns></returns>
Create an instance of parameter with tensor data.
Create an instance of parameter with tensor data .
public static Parameter Create(Tensor data, string name = "")
        {
            if (string.IsNullOrWhiteSpace(name))
                name = "v";
            Parameter x = new Parameter(name, data.ElementType, data.Shape);
            x.Data = data;
            return x;
        }
public static Parameter Create ( Tensor data , string name = " " ) { if ( string . IsNullOrWhiteSpace ( name ) ) name = " " ; Parameter x = new Parameter ( name , data . ElementType , data . Shape ) ; x . Data = data ; return x ; }
Create an instance of parameter with tensor data.
Create an instance of parameter with tensor data .
None
data
Tensor
The tensor data to build the parameter.
The tensor data to build the parameter .
name
string
The name of the parameter.
The name of the parameter .