Skip to content

Getting started

Jupyter notebooks

Example Jupyter notebooks are provided at https://github.com/CESNET/cesnet-tcexamples. Start with:

Code snippets

from cesnet_models.models import MM_CESNET_V2_Weights, mm_cesnet_v2

pretrained_weights = MM_CESNET_V2_Weights.CESNET_QUIC22_Week44
model = mm_cesnet_v2(weights=pretrained_weights, model_dir="models/")
This code will download pre-trained weights into the specified folder and initialize the mm-CESNET-v2 model. Available pre-trained weights for this model are listed in the MM_CESNET_V2_Weights enum and are named based on the dataset and training time period. When weights are specified, the model is set in the evaluation mode by default using model.eval(). To train the model, you should first set it back in the training mode with model.train().