Class Permute
Permutes the dimensions of the input according to a given pattern. Useful for e.g.connecting RNNs and convnets together.
Inherited Members
Namespace: SiaNet.Layers
Assembly: SiaNet.dll
Syntax
public class Permute : BaseLayer
Constructors
| Improve this Doc View SourcePermute(Int32[])
Initializes a new instance of the Permute class.
Declaration
public Permute(params int[] dims)
Parameters
Type | Name | Description |
---|---|---|
System.Int32[] | dims | The dims. |
Properties
| Improve this Doc View SourceDims
Permutation pattern, does not include the samples dimension. Indexing starts at 1. For instance, (2, 1) permutes the first and second dimension of the input.
Declaration
public int[] Dims { get; set; }
Property Value
Type | Description |
---|---|
System.Int32[] | The dims. |
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. |