layer_t Derived Type

type, public :: layer_t

linked list of layers, each comprised of a linked list of neurons


Inherits

type~~layer_t~~InheritsGraph type~layer_t layer_t type~layer_t->type~layer_t next type~neuron_t neuron_t type~layer_t->type~neuron_t neuron type~neuron_t->type~neuron_t next

Components

Type Visibility Attributes Name Initial
integer, public, kind :: k = default_real
type(neuron_t(k)), private :: neuron

linked list of this layer's neurons

type(layer_t(k)), private, allocatable :: next

next layer


Constructor

public interface layer_t

  • private recursive module function default_real_construct_layer(layer_lines, start) result(layer)

    construct a linked list of layer_t objects from an array of JSON-formatted text lines

    Arguments

    Type IntentOptional Attributes Name
    type(string_t), intent(in) :: layer_lines(:)
    integer, intent(in) :: start

    Return Value type(layer_t), target

  • private recursive module function double_precision_construct_layer(layer_lines, start) result(layer)

    construct a linked list of layer_t objects from an array of JSON-formatted text lines

    Arguments

    Type IntentOptional Attributes Name
    type(double_precision_string_t), intent(in) :: layer_lines(:)
    integer, intent(in) :: start

    Return Value type(layer_t(double_precision)), target


Type-Bound Procedures

generic, public :: count_inputs => default_real_count_inputs, double_precision_count_inputs

generic, public :: count_layers => default_real_count_layers, double_precision_count_layers

generic, public :: count_neurons => default_real_count_neurons, double_precision_count_neurons

generic, public :: neural_network => default_real_neural_network, double_precision_neural_network

generic, public :: neurons_per_layer => default_real_neurons_per_layer, double_precision_neurons_per_layer

generic, public :: next_allocated => default_real_next_allocated, double_precision_next_allocated

generic, public :: next_pointer => default_real_next_pointer, double_precision_next_pointer

procedure, private :: default_real_count_inputs

  • interface

    private module function default_real_count_inputs(layer) result(num_inputs)

    Arguments

    Type IntentOptional Attributes Name
    class(layer_t), intent(in) :: layer

    Return Value integer

procedure, private :: default_real_count_layers

  • interface

    private module function default_real_count_layers(layer) result(num_layers)

    Arguments

    Type IntentOptional Attributes Name
    class(layer_t), intent(in), target :: layer

    Return Value integer

procedure, private :: default_real_count_neurons

  • interface

    private module function default_real_count_neurons(layer) result(neurons_per_layer_result)

    Arguments

    Type IntentOptional Attributes Name
    class(layer_t), intent(in), target :: layer

    Return Value integer, allocatable, (:)

procedure, private :: default_real_neural_network

  • interface

    private module function default_real_neural_network(hidden_layers, metadata, output_layer, input_map, output_map) result(neural_network_)

    Arguments

    Type IntentOptional Attributes Name
    class(layer_t), intent(in), target :: hidden_layers
    type(string_t), intent(in) :: metadata(:)
    type(layer_t), intent(in), target :: output_layer
    type(tensor_map_t), intent(in) :: input_map
    type(tensor_map_t), intent(in) :: output_map

    Return Value type(neural_network_t)

procedure, private :: default_real_neurons_per_layer

  • interface

    private module function default_real_neurons_per_layer(self) result(num_neurons)

    Arguments

    Type IntentOptional Attributes Name
    class(layer_t), intent(in), target :: self

    Return Value integer

procedure, private :: default_real_next_allocated

  • interface

    private module function default_real_next_allocated(self) result(next_is_allocated)

    Arguments

    Type IntentOptional Attributes Name
    class(layer_t), intent(in) :: self

    Return Value logical

procedure, private :: default_real_next_pointer

  • interface

    private module function default_real_next_pointer(self) result(next_ptr)

    Arguments

    Type IntentOptional Attributes Name
    class(layer_t), intent(in), target :: self

    Return Value type(layer_t), pointer

procedure, private :: double_precision_count_inputs

  • interface

    private module function double_precision_count_inputs(layer) result(num_inputs)

    Arguments

    Type IntentOptional Attributes Name
    class(layer_t(double_precision)), intent(in) :: layer

    Return Value integer

procedure, private :: double_precision_count_layers

  • interface

    private module function double_precision_count_layers(layer) result(num_layers)

    Arguments

    Type IntentOptional Attributes Name
    class(layer_t(double_precision)), intent(in), target :: layer

    Return Value integer

procedure, private :: double_precision_count_neurons

  • interface

    private module function double_precision_count_neurons(layer) result(neurons_per_layer_result)

    Arguments

    Type IntentOptional Attributes Name
    class(layer_t(double_precision)), intent(in), target :: layer

    Return Value integer, allocatable, (:)

procedure, private :: double_precision_neural_network

  • interface

    private module function double_precision_neural_network(hidden_layers, metadata, output_layer, input_map, output_map) result(neural_network_)

    Arguments

    Type IntentOptional Attributes Name
    class(layer_t(double_precision)), intent(in), target :: hidden_layers
    type(metadata_t), intent(in) :: metadata
    type(layer_t(double_precision)), intent(in), target :: output_layer
    type(tensor_map_t(double_precision)), intent(in) :: input_map
    type(tensor_map_t(double_precision)), intent(in) :: output_map

    Return Value type(neural_network_t(double_precision))

procedure, private :: double_precision_neurons_per_layer

  • interface

    private module function double_precision_neurons_per_layer(self) result(num_neurons)

    Arguments

    Type IntentOptional Attributes Name
    class(layer_t(double_precision)), intent(in), target :: self

    Return Value integer

procedure, private :: double_precision_next_allocated

  • interface

    private module function double_precision_next_allocated(self) result(next_is_allocated)

    Arguments

    Type IntentOptional Attributes Name
    class(layer_t(double_precision)), intent(in) :: self

    Return Value logical

procedure, private :: double_precision_next_pointer

  • interface

    private module function double_precision_next_pointer(self) result(next_ptr)

    Arguments

    Type IntentOptional Attributes Name
    class(layer_t(double_precision)), intent(in), target :: self

    Return Value type(layer_t(double_precision)), pointer