Class Repeat
Repeat the input for specified number of times, for an axis
Inherited Members
Namespace: SiaNet.Layers
Assembly: SiaNet.dll
Syntax
public class Repeat : BaseLayer
Constructors
| Improve this Doc View SourceRepeat(Int32, Int32)
Initializes a new instance of the Repeat class.
Declaration
public Repeat(int numTimes, int axis = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | numTimes | Integer, repetition factor. |
System.Int32 | axis | Axis to which the tensor will be repeated |
Properties
| Improve this Doc View SourceAxis
Axis to which the tensor will be repeated
Declaration
public int Axis { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The axis. |
NumTimes
Integer, repetition factor
Declaration
public int NumTimes { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The number times. |
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. |