nondefaced_detector.models.model.Submodel

Submodel(root_path, input_shape=(32, 32), dropout=0.4, name='axial', weights='axial', include_top=True, trainable=True)[source]

3 identical submodel blocks are used to train on spatial information from all three axes (axial, coronal, sagittal) separately.

Parameters
  • root_path (str, Path) – Root directory for storing the weights.

  • input_shape (tuple of ints, default=(32, 32)) – The shape of the input image.

  • dropout (float, optional, default=0.4) – Float between 0 and 1. Fraction of the input units to drop.

  • name (str) – Name of the submodel.

  • weights (str) – Name of the folder to store the weights for the submodel.

  • include_top (bool, default=True) – If True, the the model includes the ClassiferHead block at the end.

  • trainable (bool, default=True) – If True, the model is set to be trainable else the model layers are frozen.

Returns

Returns a tf.keras.Model object with features.

Return type

tf.keras.Model