ertk.pytorch.utils

PyTorch utilities.

get_activation(act, *args, **kwargs)

Get torch Module for activation function.

get_loss(loss, *args, **kwargs)

Get torch Module for activation function.

load_tensorboard()

Replaces the TensorFlow tensorboard with the tensorboard stub.

frame_tensor(x, frame_size, frame_shift[, ...])

Frames an array over a given axis with optional padding and copying.

add_signal_awgn(x[, snr])

Add additive white Gaussian noise (AWGN) to a signal or batch of signals.

add_gaussian(x[, sigma, multiplicative])

Add Gaussian noise to a tensor or batch of tensors.

spectrogram(x, sr[, kind, pre_emphasis, ...])