
Directories | |
| core | |
| function | |
Files | |
| ANN.cpp | |
This is plumed ANN function (annfunc) module. It implements ANN class, which is a subclass of Function class. ANN class takes multi-dimensional arrays as inputs for a fully-connected feedforward neural network with specified neural network weights and generates corresponding outputs. The ANN outputs can be used as collective variables, inputs for other collective variables, or inputs for data analysis tools.
Enable compilation by adding the --enable-modules=annfunc to the configure command.
It is used in a similar way to other plumed functions. To define an ANN function object, we need to define following keywords:
Assuming we have an ANN function object named ann, we use ann.node-0, ann.node-1, ... to access component 0, 1, ... of its outputs (used as collective variables, inputs for other collective variables, or data analysis tools).
Assume we have an ANN with numbers of nodes being [2, 3, 1], and weights connecting layer 0 and 1 are
weights connecting layer 1 and 2 are
Bias for layer 1 and 2 are
and
respectively.
All activation functions are Tanh.
Then if input variables are l_0_out_0, l_0_out_1, the corresponding ANN function object can be defined using following plumed script:
This plumed script can be generated with function Plumed_helper.get_ANN_expression() in this repository. Following is the Python code using this function to generate the script above:
Wei Chen (UIUC, weich.nosp@m.en9@.nosp@m.illin.nosp@m.ois..nosp@m.edu) and Andrew Ferguson (University of Chicago, andre.nosp@m.wfer.nosp@m.guson.nosp@m.@uch.nosp@m.icago.nosp@m..edu)
See ./COPYRIGHT
Hosted by GitHub
|
1.17.0
|