tortreinador.models package#

Submodules#

tortreinador.models.MDN module#

class tortreinador.models.MDN.Mixture[source]#

Bases: Module

forward(pi, mu, sigma, sample_for='train')[source]#

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool#
class tortreinador.models.MDN.NLLLoss[source]#

Bases: Module

Implementation of NLLLoss using probability density function

Using probability density function to calculate the NLLLoss will more suitable for regression task, it will not break the straight relationship between loss function and weight of model. Besides, the implementation method of firstly sampling than calculate the loss function will increase the uncertainly and break the straight relationship.

forward(pi, mu, sigma, y)[source]#

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool#
class tortreinador.models.MDN.NLLLoss_Version_2[source]#

Bases: Module

forward(pdf, y_true)[source]#

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool#
class tortreinador.models.MDN.RelativeError[source]#

Bases: Module

forward(y_ture, samples, eps=1e-06)[source]#

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool#
class tortreinador.models.MDN.mdn(input_size, output_size, num_gaussian, num_hidden)[source]#

Bases: Module

forward(x, eps=1e-06)[source]#

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool#

Module contents#