Whats this rock!
  • Getting Started
  • Tutorial
  • Resources
    • Telegram Rock Classifier Chatbot
    • Keras-CV
    • Tensorflow (tutorial)
    • nbdev (docs)
  • Help
    • Report an Issue

Training

  • Download
    • Download dataset
    • Download utilities
  • Preprocess
    • Preprocess Data
  • Exploratory Data Analysis
    • Exploratory Analysis
  • Config Management
    • Hydra
  • Training models
    • Training
    • Training utilities
    • Training models
    • Callbacks
  • MLOps
    • Experiment Tracking
    • HyperParameter Tuning
    • Model Management
  • Telegram Bot
    • Telegram bot deployment

On this page

  • train
  • evaluate
  • main

Report an issue

Training


source

train

 train (cfg:omegaconf.dictconfig.DictConfig,
        train_dataset:tensorflow.python.data.ops.dataset_ops.DatasetV2,
        val_dataset:tensorflow.python.data.ops.dataset_ops.DatasetV2,
        class_weights:dict)

Train the model and returns model and history.

Type Details
cfg DictConfig Hydra Configuration
train_dataset DatasetV2 Train Dataset
val_dataset DatasetV2 Validation Dataset
class_weights dict Class weights dictionary
Returns model and history model and history

source

evaluate

 evaluate (cfg:omegaconf.dictconfig.DictConfig,
           model:keras.engine.training.Model, history:dict,
           test_dataset:tensorflow.python.data.ops.dataset_ops.DatasetV2,
           labels:list)

Evaluate the trained model on Test Dataset, log confusion matrix and classification report.

Type Details
cfg DictConfig Hydra Configuration.
model Model Tensorflow model.
history dict History object.
test_dataset DatasetV2 Test Dataset.
labels list List of Labels.

source

main

 main (cfg)

Run Main function.

Type Details
cfg DictConfig Hydra Configuration
Returns None