braindecode.models.TFMTokenizerOutput#

class braindecode.models.TFMTokenizerOutput(reconstruction: Tensor, token_ids: Tensor, quantized: Tensor, embeddings: Tensor, quantization_loss: Tensor, target_spectrogram: Tensor)[source]#

Outputs of TFMTokenizer.tokenize().

reconstruction[source]#

Reconstructed magnitude spectra, (batch, channels, n_freqs, n_frames).

Type:

torch.Tensor

token_ids[source]#

Motif IDs, (batch, channels, n_frames).

Type:

torch.LongTensor

quantized[source]#

Straight-through quantized embeddings, (batch * channels, n_frames, embed_dim).

Type:

torch.Tensor

embeddings[source]#

L2-normalized embeddings before quantization, same shape as quantized.

Type:

torch.Tensor

quantization_loss[source]#

Codebook plus commitment_cost times commitment loss.

Type:

torch.Tensor

target_spectrogram[source]#

Unmasked magnitude spectra, same shape as reconstruction.

Type:

torch.Tensor