Nodes of different colours represent the following:
Solid arrows point from a submodule to the (sub)module which it is
descended from. Dashed arrows point from a module or program unit to
modules which it uses.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Nodes of different colours represent the following:
Solid arrows point from a submodule to the (sub)module which it is
descended from. Dashed arrows point from a module or program unit to
modules which it uses.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Pass an array of features forward through multiple models in batches.
Arguments
models :
type(ModelPtr) (dim: (:,:)) [inout]– The model for which the forward pass will be performed.
model_indices :
integer (dim: (:)) [in]
features :
real(DP) (dim: (:,:)) [inout]– The feature values for each sample (max_num_features x num_samples).
num_features :
integer (dim: (MAX_ELEM_NUM)) [in]– The number of features for each atomic number in `features.
num_extra_features :
integer (dim: (size(models,2))) [in]– The number of additional feature values that will be appended to the
`features` array.
extra_features :
real(DP) (dim: (:,:,:,:)) [in]– Additional feature values that will be appended to the `features` array.
The features array must be large enough upon entry to accomodate all
extra_features. The number of extra_features can be different between
models, but is the same for all committee members of a model.
The values of extra_features can differ between committee members and
will be copied to the correct place before the full features array
is passed to the model.
Dimensions: (maxval(num_extra_features), num_samples, committee_size, num_models).
batchsize :
integer (dim: (MAX_ELEM_NUM)) [in]– How large the batches are supposed to be for each atomic number.
atomic_numbers :
integer (dim: (:)) [in]– The atomic number belonging to each sample in `features`
model_output :
real(DP) (dim: (:,:,:,:)) [out]– The output of the model for each given sample. The values will be
returned in the order in which the appeared in `features`. This is
different from the order of the batched forward pass, which works
through all batches of one atomic number before starting the next
one.
Dimensions: (num_samples, num_output_values, committee_size, num_models)
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Pass an array of features forward through multiple models in batches.
Arguments
models :
type(ModelPtr) (dim: (:)) [inout]– The model for which the forward pass will be performed.
features :
real(DP) (dim: (:,:)) [inout]– The feature values for each sample (max_num_features x num_samples).
num_features :
integer (dim: (MAX_ELEM_NUM)) [in]– The number of features for each atomic number in `features.
num_extra_features :
integer [in]– The number of additional feature values that will be appended to the
`features` array.
extra_features :
real(DP) (dim: (:,:,:)) [in]– Additional feature values that will be appended to the `features` array.
The features array must be large enough upon entry to accomodate all
extra_features. The number of extra_features can be different between
models, but is the same for all committee members of a model.
The values of extra_features can differ between committee members and
will be copied to the correct place before the full features array
is passed to the model.
Dimensions: (maxval(num_extra_features), num_samples, committee_size).
batchsize :
integer (dim: (MAX_ELEM_NUM)) [in]– How large the batches are supposed to be for each atomic number.
atomic_numbers :
integer (dim: (:)) [in]– The atomic number belonging to each sample in `features`
model_output :
real(DP) (dim: (:,:,:)) [out]– The output of the model for each given sample. The values will be
returned in the order in which the appeared in `features`. This is
different from the order of the batched forward pass, which works
through all batches of one atomic number before starting the next
one.
Dimensions: (num_samples, num_output_values, committee_size).
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Pass an array of features forward and backward through a model
in batches.
This routine can be helpful for two applications: when
loss_gradients is given, it will calculate the gradients with
respect to the model parameters (e.g. dL/dW and dL/db for a
neural network). If loss_gradients are not given, it will only
calculate the gradients of the model (d_output_d_input). Storing
the model output and d_output_d_input is optional, as one is
often only interested in the gradients wrt the parameters.
Arguments
models :
type(ModelPtr) (dim: (:,:)) [inout]– The model through which the forward pass will be performed.
model_indices :
integer (dim: (:)) [in]
features :
real(DP) (dim: (:,:)) [inout]– The feature values for each sample (max_num_features x num_samples).
num_features :
integer (dim: (MAX_ELEM_NUM)) [in]– The number of features for each atomic number and each model in `features.
The number of features is the same for all committee members of one
model.
num_extra_features :
integer (dim: (size(models,2))) [in]– The number of additional feature values that will be appended to the
`features` array.
extra_features :
real(DP) (dim: (:,:,:,:)) [in]– Additional feature values that will be appended to the `features` array.
The features array must be large enough upon entry to accomodate all
extra_features. The number of extra_features can be different between
models, but is the same for all committee members of a model.
The values of extra_features can differ between committee members and
will be copied to the correct place before the full features array
is passed to the model.
Dimensions: (maxval(num_extra_features), num_samples, committee_size, num_models).
batchsize :
integer (dim: (MAX_ELEM_NUM)) [in]– How large the batches are supposed to be for each atomic number.
atomic_numbers :
integer (dim: (:)) [in]– The atomic number belonging to each sample in `features`
model_output :
real(DP) (dim: (:,:,:,:)) [out]– The output of the model for each given sample. The values will be
returned in the order in which the appeared in `features`. This is
different from the order of the batched forward pass, which works
through all batches of one atomic number before starting the next
one.
Dimensions: (num_samples, num_output_values, committee_size, num_models).
jacobian :
real(DP) (dim: (:,:,:,:,:)) [out]– The derivatives of the model output with respect to the model input.
The ordering is the same as in `model_output`.
Dimensions: (maxval(num_features + num_extra_features), num_samples,
num_output_values, committee_size, num_models).
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.