Deep Learning Class

Contains core classes and methods for initializing the deep learning 3D CNN model with different variants of the loss function, inputs are provided from the modelconfig_train.py file

class dlmfg.core.core_model.DLModel(model_type, output_dimension, optimizer, loss_function, regularizer_coeff, output_type='regression')[source]

Deep Learning Model Class

Parameters
  • model_type (str (required)) – Type of model to be used for training 3D CNN with MSE loss, 3D CNN with hetreoskedastic aleatoric loss, 3D CNN with a mixture density network (GMM) output

  • output_dimension (int (required)) – Number of output nodes for the network equal to number of KCCs for the assembly in case MSE is used as loss function

  • optimizer (keras.optimizer (required)) – The optimizer to be used while model training, refer: https://keras.io/optimizers/ for more information

  • loss_function (keras.losses (required)) – The loss function to be optimized by training the model, refer: https://keras.io/losses/ for more information

  • regularizer_coeff (float (required)) – The L2 norm regularization coefficient value used in the penultimate fully connected layer of the model, refer: https://keras.io/regularizers/ for more information

  • output_type (str) – The output type of the model which can be regression or classification, this is used to define the output layer of the model, defaults to regression (classification: softmax, regression: linear)

cnn_model_3d(voxel_dim, deviation_channels)[source]

Build the 3D Model using the specified loss function, the inputs are parsed from the assemblyconfig_<case_study_name>.py file

Parameters
  • voxel_dim (int (required)) – The voxel dimension of the input, required to build input to the 3D CNN model

  • voxel_channels (int (required)) – The number of voxel channels in the input structure, required to build input to the 3D CNN model

cnn_model_3d_aleatoric(voxel_dim, deviation_channels)[source]

Build the 3D Model with a heteroeskedastic aleatoric loss, this enables different standard deviation of each predicted value, to be used when the expected sensor noise is heteroskedastic

Parameters
  • voxel_dim (int (required)) – The voxel dimension of the input, required to build input to the 3D CNN model

  • voxel_channels (int (required)) – The number of voxel channels in the input structure, required to build input to the 3D CNN model

cnn_model_3d_mdn(voxel_dim, deviation_channels, num_of_mixtures=5)[source]

Build the 3D Model with a Mixture Density Network output the gives parameters of a Gaussian Mixture Model as output, to be used if the system is expected to be collinear (Multi-Stage Assembly Systems) i.e. a single input can have multiple outputs Functions for predicting and sampling from a MDN.py need to used when deploying a MDN based model refer https://publications.aston.ac.uk/id/eprint/373/1/NCRG_94_004.pdf for more details on the working of a MDN model refer https://arxiv.org/pdf/1709.02249.pdf to understand how a MDN model can be leveraged to estimate the epistemic and aleatoric unceratninty present in manufacturing sytems based on the data collected

Parameters
  • voxel_dim (int (required)) – The voxel dimension of the input, reuired to build input to the 3D CNN model

  • voxel_channels (int (required)) – The number of voxel channels in the input structure, required to build input to the 3D CNN model

  • number_of_mixtures (int) – The number of mixtures in the Gaussian Mixture Model output, defaults to 5, can be increased if higher collinearity is expected

cnn_model_3d_tl(voxel_dim, deviation_channels)[source]

Build the 3D Model with GlobalMAxPooling3D instead of flatten, this enables input for different voxel dimensions, to be used when the model needs to be leveraged for transfer learning with different size input

Parameters
  • voxel_dim (int (required)) – The voxel dimension of the input, required to build input to the 3D CNN model

  • voxel_channels (int (required)) – The number of voxel channels in the input structure, required to build input to the 3D CNN model