ertk.tensorflow.models.TFModelConfig

class ertk.tensorflow.models.TFModelConfig(optimiser: str = 'adam', opt_params: ~typing.Dict[str, ~typing.Any] = <factory>, learning_rate: float = 0.001, n_features: int = -1, n_classes: int = -1, loss: str = 'sparse_categorical_crossentropy')

Bases: ERTKConfig

Configuration for a TensorFlow model.

__init__(optimiser: str = 'adam', opt_params: ~typing.Dict[str, ~typing.Any] = <factory>, learning_rate: float = 0.001, n_features: int = -1, n_classes: int = -1, loss: str = 'sparse_categorical_crossentropy') None

Methods

__init__([optimiser, opt_params, ...])

Inherited Methods

from_config(config)

Create config object from any compatible config.

from_file(path[, override])

Create config from YAML file and optionlly override some values.

merge_with_args([args])

Merge config with command-line arguments.

to_dictconfig()

Convert config to DictConfig.

to_file(path)

Write config to YAML file.

to_string()

Generate YAML string representation of config.

Attributes

learning_rate

The learning rate to use.

loss

The loss function to use.

n_classes

The number of classes in the output data.

n_features

The number of features in the input data.

optimiser

The optimiser to use.

opt_params

The parameters to pass to the optimiser.

learning_rate: float = 0.001

The learning rate to use.

loss: str = 'sparse_categorical_crossentropy'

The loss function to use.

n_classes: int = -1

The number of classes in the output data.

n_features: int = -1

The number of features in the input data.

opt_params: Dict[str, Any]

The parameters to pass to the optimiser.

optimiser: str = 'adam'

The optimiser to use.