SubNNP¶
-
class
hdnnpy.model.models.
SubNNP
(element, n_feature, hidden_layers, n_property)[source]¶ Bases:
chainer.link.Chain
Feed-forward neural network representing one element or atom.
element
is registered as a persistent value.It consists of repetition of fully connected layer and activation function.Weight initializer ischainer.initializers.HeNormal
.Parameters: - element (str) – Element symbol represented by an instance.
- n_feature (int) – Number of nodes of input layer.
- hidden_layers (list [tuple [int, str]]) – A neural network structure. Last one is output layer,
and the remains are hidden layers. Each element is a
tuple
(# of nodes, activation function)
, for example(50, 'sigmoid')
. Only activation functions implemented in chainer.functions can be used. - n_property (int) – Number of nodes of output layer.
-
differentiate
(x, enable_double_backprop)[source]¶ Calculate derivative of the output data w.r.t. input data.
Parameters: - x (Variable) – Input data which has the shape
(n_sample, n_input)
. - enable_double_backprop (bool) – Passed to
chainer.grad()
to determine whether to create more deep calculation graph or not.
- x (Variable) – Input data which has the shape
-
feedforward
(x)[source]¶ Propagate input data in a feed-forward way.
Parameters: x (Variable) – Input data which has the shape (n_sample, n_input)
.
-
second_differentiate
(x, enable_double_backprop)[source]¶ Calculate 2nd derivative of the output data w.r.t. input data.
Parameters: - x (Variable) – Input data which has the shape
(n_sample, n_input)
. - enable_double_backprop (bool) – Passed to
chainer.grad()
to determine whether to create more deep calculation graph or not.
- x (Variable) – Input data which has the shape