@@ -31,8 +31,8 @@ module inference_engine_m_
3131 contains
3232 procedure :: infer
3333 procedure :: to_json
34- procedure :: input_range
35- procedure :: output_range
34+ procedure :: map_to_input_range
35+ procedure :: map_from_output_range
3636 procedure :: num_inputs
3737 procedure :: num_outputs
3838 procedure :: nodes_per_layer
@@ -82,16 +82,20 @@ impure elemental module function construct_from_json(file_) result(inference_eng
8282
8383 interface
8484
85- pure module function input_range(self) result(my_input_range)
85+ elemental module function map_to_input_range(self, tensor) result(normalized_tensor)
86+ ! ! The result contains the input tensor values normalized to fall on the range used during training
8687 implicit none
8788 class(inference_engine_t), intent (in ) :: self
88- type (tensor_range_t) my_input_range
89+ type (tensor_t), intent (in ) :: tensor
90+ type (tensor_t) normalized_tensor
8991 end function
9092
91- pure module function output_range(self) result(my_output_range)
93+ elemental module function map_from_output_range(self, normalized_tensor) result(tensor)
94+ ! ! The result contains the output tensor values unnormalized via the inverse of the mapping used in training
9295 implicit none
9396 class(inference_engine_t), intent (in ) :: self
94- type (tensor_range_t) my_output_range
97+ type (tensor_t), intent (in ) :: normalized_tensor
98+ type (tensor_t) tensor
9599 end function
96100
97101 pure module function to_exchange(self) result(exchange)
0 commit comments