ml.service
- class tinychain.ml.service.NeuralNets[source]
Bases:
Library- class ConvLayer(*args, **kwargs)
-
- classmethod create(inputs_shape, filter_shape, stride=1, padding=1, activation=None, optimal_std=None)
Create a new, empty
ConvLayerwith the given shape and activation function.- Args:
- inputs_shape: size of inputs [c_i, h_i, w_i] where
c_i: number of channels, h_i: channel height, ‘w_i’: channel width;
- filter_shape: size of filter [h_f, w_f, out_c] where
out_c: number of output channels, h_f: kernel height, ‘w_f`: kernel width;
activation: activation function
- eval = <tinychain.reflect.stub.StateFunctionStub object>
- class DNN(*args, **kwargs)
Bases:
Sequential- classmethod create(schema)
Create a new
Sequentialneural net ofLinearlayers.schema should be a list of 2- or 3-tuples of the form (input_size, output_size, activation) (the arguments to Linear.create).
- class Layer(*args, **kwargs)
Bases:
Model,DifferentiableA
Layerin aNeuralNet- gradient = <tinychain.reflect.stub.ReflectionStub object>
- class tinychain.ml.service.Optimizers[source]
Bases:
Library- class Adam(*args, **kwargs)
-
Adam optimizer, an adaptive learning rate optimization algorithm designed to handle sparse gradients and noisy data.
Based on “Adam: A Method for Stochastic Optimization” by Kingma & Ba, 2014: https://arxiv.org/abs/1412.6980
- train = <tinychain.reflect.stub.StateFunctionStub object>