How lll2657/omrep works
Main Components and Their Roles
• Data/Dataset Handling: Both the ANML and OMREP directories include a datasets submodule. These components handle data loading, task sampling, and processing for datasets such as Omniglot, Mini-ImageNet, and CIFAR-FS.
• Model Modules: Both parts have model directories that contain learner definitions, meta-learner modules, and a ModelFactory that creates networks for meta-training/meta-testing. In OMREP, additional initialization functions (e.g., initialize_layers.py) are present.
• Experiment Management: Separate experiment folders are provided for running meta-training procedures. This component orchestrates the meta-learning loops, specifying inner loops (tasks, update steps) and outer loops (meta-updates).
• Evaluation and Visualization: Standalone scripts for evaluation (evaluate_*.py), t-SNE visualization (tsne_*.py), and K-NN testing (knn_*.py) tie into the training pipelines to assess performance.
• Configurations (OMREP only): The OMREP branch includes a configuration directory that holds parsing logic (class_parser.py and related files) that helps set up the experiments or choose meta-learning methods.
Relationships and Data Flow
• Data flow starts from the dataset loader: raw input images and CSV splits are parsed in the datasets folders.
• The experiments then call the model components (through model factories) to create learners and meta-learners, which perform inner and outer loop learning.
• Evaluation and visualization scripts sample from the trained models and data representations to create performance metrics and plots (for t-SNE and classification accuracy).
Architectural Patterns and Design Principles
• Modular Separation: The clear separation into datasets, experiment, model, and utility directories reflects a modular design that supports experimenting with different meta-learning strategies.
• Reusability and Extensibility: The existence of factory and utils modules is an indicator of design for extensibility (for example, easy to add new datasets or meta-training methods).
Relevant Technologies
• The system is built on Python and makes use of key libraries such as PyTorch (with torch and torchvision), NumPy, and TensorFlow (used for some tensorboard or auxiliary tasks).