mlreflect.models package
Submodules
mlreflect.models.model_helpers module
mlreflect.models.simple_model module
- class mlreflect.models.simple_model.SimpleModel(directory_name: str, n_input: int, n_output: int)[source]
Bases:
object
mlreflect.models.trained_model module
- class mlreflect.models.trained_model.DefaultTrainedModel[source]
Bases:
mlreflect.models.trained_model.TrainedModel
Populated TrainedModel container for a single layer on a Si/SiOx substrate.
- class mlreflect.models.trained_model.TrainedModel[source]
Bases:
object
Container object for trained keras models. Contains other information necessary to predict reflectivity data.
Object can be loaded from variables or from a saved .h5 file.
- Properties:
sample: keras_model: q_values: ip_mean: ip_std:
- from_file(file_name: str, **kwargs)[source]
Populates the TrainedModel container with data saved in the given .h5 file.
- Parameters
file_name – Full path to the .h5 file that contains the saved data.
- from_variable(model: tensorflow.python.keras.engine.training.Model, sample: mlreflect.data_generation.multilayer.MultilayerStructure, q_values: numpy.ndarray, ip_mean: numpy.ndarray, ip_std: numpy.ndarray)[source]
Populates the TrainedModel container with the given arguments.
- Parameters
model – Trained keras model.
sample – MultiLayer object of the sample structure that what used for training
q_values – q values that were used for training
ip_mean – Mean values of all training inputs used for input standardization.
ip_std – Standard deviation of all training inputs used for input standardization.
- property ip_mean
- property ip_std
- property keras_model
- property q_values
- property sample
Module contents
- class mlreflect.models.DefaultTrainedModel[source]
Bases:
mlreflect.models.trained_model.TrainedModel
Populated TrainedModel container for a single layer on a Si/SiOx substrate.
- class mlreflect.models.TrainedModel[source]
Bases:
object
Container object for trained keras models. Contains other information necessary to predict reflectivity data.
Object can be loaded from variables or from a saved .h5 file.
- Properties:
sample: keras_model: q_values: ip_mean: ip_std:
- from_file(file_name: str, **kwargs)[source]
Populates the TrainedModel container with data saved in the given .h5 file.
- Parameters
file_name – Full path to the .h5 file that contains the saved data.
- from_variable(model: tensorflow.python.keras.engine.training.Model, sample: mlreflect.data_generation.multilayer.MultilayerStructure, q_values: numpy.ndarray, ip_mean: numpy.ndarray, ip_std: numpy.ndarray)[source]
Populates the TrainedModel container with the given arguments.
- Parameters
model – Trained keras model.
sample – MultiLayer object of the sample structure that what used for training
q_values – q values that were used for training
ip_mean – Mean values of all training inputs used for input standardization.
ip_std – Standard deviation of all training inputs used for input standardization.
- property ip_mean
- property ip_std
- property keras_model
- property q_values
- property sample