Define an abstraction that supports inference operationsn on a neural network
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=*), | private, | parameter | :: | key(*) | = | [character(len=len("usingSkipConnections"))::"modelName", "modelAuthor", "compilationDate", "activationFunction", "usingSkipConnections"] |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(inference_engine_t), | intent(in) | :: | self | |||
type(tensor_t), | intent(in) | :: | inputs |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(file_t), | intent(in) | :: | file_ |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(string_t), | intent(in) | :: | metadata(:) | |||
real(kind=rkind), | intent(in) | :: | weights(:,:,:) | |||
real(kind=rkind), | intent(in) | :: | biases(:,:) | |||
integer, | intent(in) | :: | nodes(0:) | |||
type(tensor_range_t), | intent(in), | optional | :: | input_range | ||
type(tensor_range_t), | intent(in), | optional | :: | output_range |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(inference_engine_t), | intent(in) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(inference_engine_t), | intent(in) | :: | self | |||
type(inference_engine_t), | intent(in) | :: | inference_engine |
The result contains the output tensor values unnormalized via the inverse of the mapping used in training
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(inference_engine_t), | intent(in) | :: | self | |||
type(tensor_t), | intent(in) | :: | normalized_tensor |
The result contains the input tensor values normalized to fall on the range used during training
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(inference_engine_t), | intent(in) | :: | self | |||
type(tensor_t), | intent(in) | :: | tensor |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(inference_engine_t), | intent(in) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(difference_t), | intent(in) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(inference_engine_t), | intent(in) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(inference_engine_t), | intent(in) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(inference_engine_t), | intent(in) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(inference_engine_t), | intent(in) | :: | self | |||
type(inference_engine_t), | intent(in) | :: | rhs |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(inference_engine_t), | intent(in) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(inference_engine_t), | intent(in) | :: | self |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=rkind), | private, | allocatable | :: | biases_difference_(:,:) | |||
integer, | private, | allocatable | :: | nodes_difference_(:) | |||
real(kind=rkind), | private, | allocatable | :: | weights_difference_(:,:,:) |
procedure, public :: norm |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
class(activation_strategy_t), | public, | allocatable | :: | activation_strategy_ | |||
real(kind=rkind), | public, | allocatable | :: | biases_(:,:) | |||
type(tensor_range_t), | public | :: | input_range_ | ||||
type(string_t), | public | :: | metadata_(size(key)) | ||||
integer, | public, | allocatable | :: | nodes_(:) | |||
type(tensor_range_t), | public | :: | output_range_ | ||||
real(kind=rkind), | public, | allocatable | :: | weights_(:,:,:) |
Encapsulate the minimal information needed to perform inference
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
class(activation_strategy_t), | private, | allocatable | :: | activation_strategy_ | |||
real(kind=rkind), | private, | allocatable | :: | biases_(:,:) | |||
type(tensor_range_t), | private | :: | input_range_ | ||||
type(string_t), | private | :: | metadata_(size(key)) | ||||
integer, | private, | allocatable | :: | nodes_(:) | |||
type(tensor_range_t), | private | :: | output_range_ | ||||
real(kind=rkind), | private, | allocatable | :: | weights_(:,:,:) |
private impure, elemental, module function construct_from_json (file_) | |
private pure, module function construct_from_padded_arrays (metadata, weights, biases, nodes, input_range, output_range) |
procedure, public :: activation_function_name | |
procedure, public :: assert_conformable_with | |
procedure, public :: infer | |
procedure, public :: map_from_output_range | |
procedure, public :: map_to_input_range | |
procedure, public :: nodes_per_layer | |
procedure, public :: num_inputs | |
procedure, public :: num_outputs | |
generic, public :: operator(-) => subtract | |
procedure, public :: skip | |
procedure, public :: to_exchange | |
procedure, public :: to_json | |
procedure, private :: subtract |