Menu

Helper Module for Deep Learning.

The Spatiotemporal Attention Autoencoder network (STAAENet).

class pynet.models.attention.STAAENet(input_dim, nodecoding=False)[source]

SpatioTemporal Attention AutoEncoder (STAAE).

__init__(input_dim, nodecoding=False)[source]

Init class.

Parameters

input_dim: int

the input dimension.

nodecoding: bool, default False

if set do not apply the decoding.

static debug(name, tensor)[source]

Print debug message.

Parameters

name: str

the tensor name in the displayed message.

tensor: Tensor

a pytorch tensor.

decode(x)[source]

Maps the given latent codes onto the image space.

Parameters

x: Tensor (N, D)

sample from the distribution having latent parameters mu, var.

Returns

x: Tensor, (N, C, F)

the prediction.

encode(x)[source]

Encodes the input by passing through the encoder network and returns the latent codes.

Parameters

x: Tensor, (N, C, F)

input tensor to encode.

Returns

mu: Tensor (N, D)

mean of the latent Gaussian.

logvar: Tensor (N, D)

standard deviation of the latent Gaussian.

forward(x, **kwargs)[source]
class pynet.models.attention.SelfAttention(input_dim, output_dim)[source]
__init__(input_dim, output_dim)[source]

Initialize self. See help(type(self)) for accurate signature.

compute_output_shape(input_shape)[source]
static debug(name, tensor)[source]

Print debug message.

Parameters

name: str

the tensor name in the displayed message.

tensor: Tensor

a pytorch tensor.

forward(x, **kwargs)[source]

Follow us

© 2019, pynet developers .
Inspired by AZMIND template.