dnn_learn¶
The file responsible for the learning of the model.
-
dnn_learn
()¶ Parameters: - b_n – batch number
- ep – epoch number
- s_p_e – steps per epoch
- validate – bool that controls if validation is run every epoch and learning graph produced.
- d – tensorflow dataset containing glob of pulse file locations
- input_dscan – tensorflow dataset containing the dscan info from each pulse
- input_other – tensorflow dataset containing the other input parameters info from each pulse
- output_d – tensorflow dataset containing the output Electric field that is to be predicted
- dataset – tensorflow dataset that is a zipped dataset of the inputs and output
- test_dataset – tensorflow dataset for validation
- train_dataset – tensorflow dataset for training
- model – tensorflow model that is loaded from file “model.h5”
- history – tensorflow history from model.fit()
-
_set_in_scan
(af)¶ Sets the as_list sizes for the input tensor. These must be set before the dataset is passed to model.fit
Parameters: af – the tensor that will have its shape defined Return type: tensorflow tensor
-
_set_in_other
(af)¶ Sets the as_list sizes for the input tensor. These must be set before the dataset is passed to model.fit
Parameters: af – the tensor that will have its shape defined Return type: tensorflow tensor
-
_set_out
(af)¶ Sets the as_list sizes for the input tensor. These must be set before the dataset is passed to model.fit
Parameters: af – the tensor that will have its shape defined Return type: tensorflow tensor
-
read_in_scan
(filename)¶ opens the hdf5 file (filename) and reads out the array stored in ‘input_scan’
Parameters: filename – Return type: 2D array
-
read_in_other
(filename)¶ opens the hdf5 file (filename) and reads out the array stored in ‘input_other’
Parameters: filename – Return type: 1D array
-
read_out
(filename)¶ opens the hdf5 file (filename) and reads out the array stored in ‘output’
Parameters: filename – Return type: 1D array