class_docstr: ExML scenario on MNIST data.
  
  The pretrained models and class splits are taken from
  https://arxiv.org/abs/2112.06511
docstr: Init.
  
  :param scenario: If 'split', use a class-incremental scenario with 5
      experiences (2 classes each). If 'joint', use a single experience
      with all the classes. This should be used only as a baseline since
      it is not a continual scenario.
  :param run_id: an integer in [0, 4]. Each run uses a different set of
      expert models and data splits.
docstr_tok: ["Init",".",":","param","scenario",":","If","'split","'",",","use","a","class-incremental","scenario","with","5","experiences","(","2","classes","each",")",".","If","'joint","'",",","use","a","single","experience","with","all","the","classes",".","This","should","be","used","only","as","a","baseline","since","it","is","not","a","continual","scenario",".",":","param","run_id",":","an","integer","in","[","0",",","4","]",".","Each","run","uses","a","different","set","of","expert","models","and","data","splits","."]
code: def __init__(self, scenario="split", run_id=0):
      """Init.
  
      :param scenario: If 'split', use a class-incremental scenario with 5
          experiences (2 classes each). If 'joint', use a single experience
          with all the classes. This should be used only as a baseline since
          it is not a continual scenario.
      :param run_id: an integer in [0, 4]. Each run uses a different set of
          expert models and data splits.
      """
      assert scenario in {
          "split",
          "joint",
      }, "`scenario` argument must be one of {'split', 'joint'}."
  
      CURR_SEED = SEED_BENCHMARK_RUNS[run_id]
  
      transforms = Compose(
          [Resize(32), Normalize((0.1307,), (0.3081,))]
      )
      if scenario == "split":
          benchmark = SplitMNIST(
              n_experiences=5,
              return_task_id=False,
              seed=CURR_SEED,
              train_transform=transforms,
              eval_transform=transforms,
          )
      elif scenario == "joint":
          benchmark = SplitMNIST(
              n_experiences=1,
              return_task_id=False,
              seed=CURR_SEED,
              train_transform=transforms,
              eval_transform=transforms,
          )
      else:
          assert False, "Should never get here."
  
      ll = len(benchmark.train_stream)
      base_model = LeNet5(10, 1)
      experts = _load_expert_models(
          f"{scenario}_mnist", base_model, run_id, ll
      )
      super().__init__(benchmark, experts)
  
imports: import urllib
  import os
  import torch
  from torch import nn
  from torch.utils.data import DataLoader
  from torchvision.models import mobilenet_v2
  from torchvision.transforms import RandomHorizontalFlip, RandomCrop, RandomRotation, ToTensor, CenterCrop, Normalize, Resize
  from avalanche.benchmarks.classic.ccifar10 import SplitCIFAR10
  from avalanche.benchmarks.classic.cmnist import SplitMNIST
  from avalanche.benchmarks.classic.core50 import CORe50
  from avalanche.benchmarks.datasets.dataset_utils import default_dataset_location
  from avalanche.benchmarks.utils.utils import concat_datasets
  from avalanche.models import LeNet5, SlimResNet18
  from torchvision.transforms import Compose
  from avalanche.evaluation.metrics import TaskAwareAccuracy
  from avalanche.benchmarks import ExModelCLScenario, nc_benchmark
  import copy
  import urllib.request
label_desc: Use image node_id 1 to create a new ExMLMNIST object from inherited base classes: ExModelCLScenario with example: obj = ExMLMNIST(scenario, run_id)