elasticai.creator_plugins.quantized_grads.tests.fxpmodel_loss_optim_test#

Module Contents#

Classes#

API#

class elasticai.creator_plugins.quantized_grads.tests.fxpmodel_loss_optim_test.Test1[source]#
test_pred(pred: torch.Tensor) None[source]#
test_loss(loss)[source]#
test_grad_weight(model, loss)[source]#
test_grad_bias(model, loss)[source]#
test_new_weight(model, optimizer_step)[source]#
test_new_bias(model, optimizer_step)[source]#
in_features() int[source]#
out_features() int[source]#
model(in_features: int, out_features: int) torch.nn.Sequential[source]#
input(in_features: int) torch.Tensor[source]#
pred(model: torch.nn.Sequential, input: torch.Tensor) torch.Tensor[source]#
output(out_features: int) torch.Tensor[source]#
loss(output: torch.Tensor, pred: torch.Tensor) torch.Tensor[source]#
optimizer(model: torch.nn.Sequential, loss: torch.Tensor) torch.optim.Optimizer[source]#
optimizer_step(optimizer: torch.optim.SGD, loss: torch.Tensor) None[source]#
class elasticai.creator_plugins.quantized_grads.tests.fxpmodel_loss_optim_test.Test2[source]#
test_pred(pred: torch.Tensor) None[source]#
test_loss(loss)[source]#
test_grad_weight(model, loss)[source]#
test_grad_bias(model, loss)[source]#
test_new_weight(model, optimizer_step)[source]#
test_new_bias(model, optimizer_step)[source]#
in_features() int[source]#
out_features() int[source]#
model(in_features: int, out_features: int) torch.nn.Sequential[source]#
input(in_features: int) torch.Tensor[source]#
pred(model: torch.nn.Sequential, input: torch.Tensor) torch.Tensor[source]#
output(out_features: int) torch.Tensor[source]#
loss(output: torch.Tensor, pred: torch.Tensor) torch.Tensor[source]#
optimizer(model: torch.nn.Sequential, loss: torch.Tensor) torch.optim.Optimizer[source]#
optimizer_step(optimizer: torch.optim.SGD, loss: torch.Tensor) None[source]#