dnn_model¶
A file that generates the model structure.
-
dnn_model
()¶ Parameters: - input1_temp – used to turn grayscale input image into a 3 channels for rgb input
- input1 – The input to the pre-trained models. Note this needs to be of shape 224x224x3.
- input2 – The input for the model that holds the other inputs (L,R_omega_0,sinc_width).
- base_model – A tensorflow.keras.Application model. By default is a Densenet121 implementation with pre-trained weights.
- x – contains the layers that are after the pre-trained model but before the concatination with input2.
- merged_model – the layers that are after the concatination.
- outputs – contains the output layer of the model.
- model – contains the tensorflow model of all the layers. Will be saved to “model.h5”.
-
def vgg_block(layer_in, n_filters, n_conv,filter_size=(3,3),in_activation='relu',in_padding='same')
The functional blocks of the vgg architecture.
Parameters: - layer_in –
- n_filters –
- n_conv –
- filter_size –
- in_activation –
- in_padding –
Return type: tensorflow keras layer
-
inception_module
(layer_in, f1, f2_in, f2_out, f3_in, f3_out, f4_out)¶ Functional blocks of the inception architecture. Be are that this model architecture get very large very fast.
Parameters: - layer_in –
- f1 –
- f2_in –
- f2_out –
- f3_in –
- f3_out –
- f4_out –
-
residual_module
(layer_in, n_filters)¶ Functional block of the residual architecture.
Parameters: - layer_in –
- n_filters –