A:
You can use :
sub2
# Save the input data to the output space.
output_data = self._output(input_data)
# Return the data after applying the specified number of blocks.
return output_data
class MNIST(LearningModelBase):
"""
This is the standard MNIST model. This is the default model for
tensor2tensor.
This is a learning model that learns by backpropagation.
Parameters
----------
training : bool
If True, it loads data from training set and create a model for it.
If False, it loads data from test set and create a model for it.
input_dim : int
Dimension of the input to the model.
hidden_dim : int
Dimension of the hidden layer.
num_classes : int
Number of output classes.
def __init__(self, training=True, input_dim=784, hidden_dim=100,
num_classes=10):
# Initialize the model
super(MNIST, self).__init__(
training=training, input
Related links:
Comments