Documentation
¶
Index ¶
- type SpectralFingerprint
- func (s *SpectralFingerprint[T]) Attributes() map[string]interface{}
- func (s *SpectralFingerprint[T]) Backward(ctx context.Context, mode types.BackwardMode, ...) ([]*tensor.TensorNumeric[T], error)
- func (s *SpectralFingerprint[T]) Forward(ctx context.Context, inputs ...*tensor.TensorNumeric[T]) (*tensor.TensorNumeric[T], error)
- func (s *SpectralFingerprint[T]) OpType() string
- func (s *SpectralFingerprint[T]) OutputShape() []int
- func (s *SpectralFingerprint[T]) Parameters() []*graph.Parameter[T]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SpectralFingerprint ¶
SpectralFingerprint computes a spectral fingerprint of a time series using FFT. It is a non-trainable layer.
func NewSpectralFingerprint ¶
func NewSpectralFingerprint[T tensor.Float](outputDim int) *SpectralFingerprint[T]
NewSpectralFingerprint creates a new SpectralFingerprint layer.
func (*SpectralFingerprint[T]) Attributes ¶
func (s *SpectralFingerprint[T]) Attributes() map[string]interface{}
Attributes returns the attributes of the layer.
func (*SpectralFingerprint[T]) Backward ¶
func (s *SpectralFingerprint[T]) Backward(ctx context.Context, mode types.BackwardMode, outputGradient *tensor.TensorNumeric[T], inputs ...*tensor.TensorNumeric[T]) ([]*tensor.TensorNumeric[T], error)
Backward for a non-trainable layer returns a nil gradient for the input.
func (*SpectralFingerprint[T]) Forward ¶
func (s *SpectralFingerprint[T]) Forward(ctx context.Context, inputs ...*tensor.TensorNumeric[T]) (*tensor.TensorNumeric[T], error)
Forward computes the spectral fingerprint. Input is expected to be a 1D tensor (or a batch of 1D tensors).
func (*SpectralFingerprint[T]) OpType ¶
func (s *SpectralFingerprint[T]) OpType() string
OpType returns the operation type of the layer.
func (*SpectralFingerprint[T]) OutputShape ¶
func (s *SpectralFingerprint[T]) OutputShape() []int
OutputShape returns the output shape of the layer.
func (*SpectralFingerprint[T]) Parameters ¶
func (s *SpectralFingerprint[T]) Parameters() []*graph.Parameter[T]
Parameters returns nil as this layer is not trainable.
Click to show internal directories.
Click to hide internal directories.