nirs4all.operators.models.tensorflow.generic module

nirs4all.operators.models.tensorflow.generic.CONV_LSTM(input_shape, params)[source]

Builds a model combining convolutional and LSTM layers.

Parameters:
  • input_shape (tuple) – Shape of the input data.

  • params (dict) – Dictionary of parameters for model configuration.

Returns:

Compiled model.

Return type:

keras.Model

nirs4all.operators.models.tensorflow.generic.Custom_Residuals(input_shape, params)[source]

Builds a custom residual model with depthwise convolutions and attention.

Parameters:
  • input_shape (tuple) – Shape of the input data.

  • params (dict) – Dictionary of parameters for model configuration.

Returns:

Compiled model.

Return type:

keras.Model

nirs4all.operators.models.tensorflow.generic.Custom_VG_Residuals(input_shape, params)[source]

Builds a custom residual model with depthwise convolutions and attention.

Parameters:
  • input_shape (tuple) – Shape of the input data.

  • params (dict) – Dictionary of parameters for model configuration.

Returns:

Compiled model.

Return type:

keras.Model

nirs4all.operators.models.tensorflow.generic.Custom_VG_Residuals2(input_shape, params)[source]

Builds a custom residual CNN model.

Parameters:
  • input_shape (tuple) – Shape of the input data.

  • params (dict) – Dictionary of parameters for model configuration.

Returns:

Compiled model.

Return type:

keras.Model

nirs4all.operators.models.tensorflow.generic.FFT_Conv(input_shape, params)[source]

Builds a CNN model with FFT preprocessing.

Parameters:
  • input_shape (tuple) – Shape of the input data.

  • params (dict) – Dictionary of parameters for model configuration.

Returns:

Compiled model.

Return type:

keras.Model

nirs4all.operators.models.tensorflow.generic.MLP(input_shape, params)[source]

Builds a simple Multi-Layer Perceptron model.

Parameters:
  • input_shape (tuple) – Shape of the input data.

  • params (dict) – Dictionary of parameters for model configuration.

Returns:

Compiled MLP model.

Return type:

keras.Sequential

nirs4all.operators.models.tensorflow.generic.ResNetV2_model(input_shape, params)[source]

Builds a ResNetV2 model.

Parameters:
  • input_shape (tuple) – Shape of the input data.

  • params (dict) – Dictionary of parameters for model configuration.

Returns:

Compiled ResNetV2 model.

Return type:

keras.Model

nirs4all.operators.models.tensorflow.generic.SEResNet_model(input_shape, params)[source]

Builds a SEResNet model.

Parameters:
  • input_shape (tuple) – Shape of the input data.

  • params (dict) – Dictionary of parameters for model configuration.

Returns:

Compiled SEResNet model.

Return type:

keras.Model

nirs4all.operators.models.tensorflow.generic.UNET(input_shape, params)[source]

Builds a U-Net architecture for regression.

Parameters:
  • input_shape (tuple) – Shape of the input data; spectrum length must be a positive multiple of 25 for the pooled encoder branches.

  • params (dict) – Dictionary of parameters for model configuration.

Returns:

Compiled U-Net model.

Return type:

keras.Model

nirs4all.operators.models.tensorflow.generic.UNet_NIRS(input_shape, params)[source]

Builds the legacy VGG11 NIRS model (the historical function name is retained).

Parameters:
  • input_shape (tuple) – Shape of the input data.

  • params (dict) – Dictionary of parameters for model configuration.

Returns:

VGG11 model.

Return type:

keras.Model

nirs4all.operators.models.tensorflow.generic.VGG_1D(input_shape, params)[source]

Builds a VGG-like 1D CNN model.

Parameters:
  • input_shape (tuple) – Shape of the input data.

  • params (dict) – Dictionary of parameters for model configuration.

Returns:

Compiled VGG-like model.

Return type:

keras.Model

nirs4all.operators.models.tensorflow.generic.XCeption1D(input_shape, params)[source]

Builds an Xception-like 1D CNN model.

Parameters:
  • input_shape (tuple) – Shape of the input data.

  • params (dict) – Dictionary of parameters for model configuration.

Returns:

Compiled Xception-like model.

Return type:

keras.Model

nirs4all.operators.models.tensorflow.generic.bard(input_shape, params)[source]

Builds a model combining convolutional and LSTM layers.

Parameters:
  • input_shape (tuple) – Shape of the input data.

  • params (dict) – Dictionary of parameters for model configuration.

Returns:

Compiled model.

Return type:

keras.Model

nirs4all.operators.models.tensorflow.generic.inception1D(input_shape, params)[source]

Builds an Inception-like 1D CNN model.

Parameters:
  • input_shape (tuple) – Shape of the input data.

  • params (dict) – Dictionary of parameters for model configuration.

Returns:

Compiled Inception-like model.

Return type:

keras.Model

nirs4all.operators.models.tensorflow.generic.senseen_origin(input_shape, params)[source]

Builds a CNN model with custom convolutional blocks.

Parameters:
  • input_shape (tuple) – Shape of the input data.

  • params (dict) – Dictionary of parameters for model configuration.

Returns:

Compiled model.

Return type:

keras.Sequential