features

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SpectralFingerprint

type SpectralFingerprint[T tensor.Float] struct {
	// contains filtered or unexported fields
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL