pytorch_utils module

pytorch_utils.build_activation(type)[source]
pytorch_utils.build_optimizer(model, type, lr, kerasDefaults, trainable_only=True)[source]
pytorch_utils.get_function(name)[source]
pytorch_utils.initialize(weights, type, kerasDefaults, seed=None, constant=0.0)[source]
pytorch_utils.mse(y_true, y_pred)[source]
pytorch_utils.set_parallelism_threads()[source]
pytorch_utils.set_seed(seed)[source]

Set the random number seed to the desired value

Parameters

seed (integer) – Random number seed.

pytorch_utils.xent(y_true, y_pred)[source]