Class Reshape
Reshapes an output to a certain shape.
Inherited Members
Namespace: SiaNet.Layers
Assembly: SiaNet.dll
Syntax
public class Reshape : BaseLayer
Constructors
| Improve this Doc View SourceReshape(Int64[])
The target output shape
Declaration
public Reshape(long[] targetShape)
Parameters
Type | Name | Description |
---|---|---|
System.Int64[] | targetShape |
Properties
| Improve this Doc View SourceTargetShape
Target new shape. One and only one dim can be 0, in which case it will be inferred from the rest of dims
Declaration
public long[] TargetShape { get; set; }
Property Value
Type | Description |
---|---|
System.Int64[] |
Methods
| Improve this Doc View SourceBackward(Tensor)
Calculate the gradient of this layer function
Declaration
public override void Backward(Tensor outputgrad)
Parameters
Type | Name | Description |
---|---|---|
Tensor | outputgrad | The calculated output grad from previous layer. |
Overrides
| Improve this Doc View SourceForward(Tensor)
Forwards the inputs and compute the output
Declaration
public override void Forward(Tensor x)
Parameters
Type | Name | Description |
---|---|---|
Tensor | x | The input tensor for this layer. |