{"id":15680790,"url":"https://github.com/vfdev-5/fixmatch-pytorch","last_synced_at":"2025-10-03T12:23:12.947Z","repository":{"id":149000988,"uuid":"255188660","full_name":"vfdev-5/FixMatch-pytorch","owner":"vfdev-5","description":"Implementation of FixMatch in PyTorch and experimentations","archived":false,"fork":false,"pushed_at":"2020-08-09T22:00:59.000Z","size":125,"stargazers_count":12,"open_issues_count":0,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-07T11:17:27.265Z","etag":null,"topics":["fixmatch","pytorch","pytorch-ignite"],"latest_commit_sha":null,"homepage":"https://app.wandb.ai/vfdev-5/fixmatch-pytorch","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vfdev-5.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-12T23:27:10.000Z","updated_at":"2025-02-28T00:31:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"b99aac6f-f41b-450a-aa9d-73b7f032135f","html_url":"https://github.com/vfdev-5/FixMatch-pytorch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vfdev-5/FixMatch-pytorch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vfdev-5%2FFixMatch-pytorch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vfdev-5%2FFixMatch-pytorch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vfdev-5%2FFixMatch-pytorch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vfdev-5%2FFixMatch-pytorch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vfdev-5","download_url":"https://codeload.github.com/vfdev-5/FixMatch-pytorch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vfdev-5%2FFixMatch-pytorch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278160365,"owners_count":25940179,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-03T02:00:06.070Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fixmatch","pytorch","pytorch-ignite"],"created_at":"2024-10-03T16:44:34.552Z","updated_at":"2025-10-03T12:23:12.912Z","avatar_url":"https://github.com/vfdev-5.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FixMatch experiments in PyTorch and Ignite\n\nExperiments with \"FixMatch\" on Cifar10 dataset.\n\nBased on [\"FixMatch: Simplifying Semi-Supervised Learning withConsistency and Confidence\"](https://arxiv.org/abs/2001.07685)\nand its official [code](https://github.com/google-research/fixmatch).\n\n**Data-augmentations policy is CTA**\n\nOnline logging on W\u0026B: https://app.wandb.ai/vfdev-5/fixmatch-pytorch\n\n## Requirements\n\n```bash\npip install --upgrade --pre hydra-core tensorboardX\npip install --upgrade git+https://github.com/pytorch/ignite\n# pip install --upgrade --pre pytorch-ignite\n```\n\nOptionally, we can install `wandb` for online experiments tracking.\n```bash\npip install wandb\n```\n\nWe can also opt to replace `Pillow` by `Pillow-SIMD` to accelerate image processing part:\n```bash\npip uninstall -y pillow \u0026\u0026 CC=\"cc -mavx2\" pip install --no-cache-dir --force-reinstall pillow-simd\n```\n\n## Training\n\n```bash\npython -u main_fixmatch.py model=WRN-28-2\n```\n\n- Default output folder: \"/tmp/output-fixmatch-cifar10\". \n- For complete list of options: `python -u main_fixmatch.py --help` \n\nThis script automatically trains on multiple GPUs (`torch.nn.DistributedParallel`). \n\nIf it is needed to specify input/output folder :  \n```\npython -u main_fixmatch.py dataflow.data_path=/data/cifar10/ hydra.run.dir=/output-fixmatch model=WRN-28-2\n```\n\nTo use wandb logger, we need login and run with `online_exp_tracking.wandb=true`:\n```bash\nwandb login \u003ctoken\u003e\npython -u main_fixmatch.py model=WRN-28-2 online_exp_tracking.wandb=true\n```\n\nTo see other options:\n```bash\npython -u main_fixmatch.py --help\n```\n\n### Training curves visualization\n\nBy default, we use Tensorboard to log training curves\n\n```bash\ntensorboard --logdir=/tmp/output-fixmatch-cifar10/\n```\n\n\n### Distributed Data Parallel (DDP) on multiple GPUs (Experimental)\n\nFor example, training on 2 GPUs \n```bash\npython -u -m torch.distributed.launch --nproc_per_node=2 main_fixmatch.py model=WRN-28-2 distributed.backend=nccl\n```\n\n### TPU(s) on Colab (Experimental)\n\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1ZoWz1-a3bpj1xMxpM2K2qQ4Y9xvtdGWO) \nFor example, training on 8 TPUs in distributed mode: \n```bash\npython -u main_fixmatch.py model=resnet18 distributed.backend=xla-tpu distributed.nproc_per_node=8\n# or python -u main_fixmatch.py model=WRN-28-2 distributed.backend=xla-tpu distributed.nproc_per_node=8\n```\n\n\n## Experimentations\n\n### Faster Resnet-18 training\n\n- reduced the number of epochs\n- reduced the number of CTA updates\n- reduced EMA decay\n\n```bash\npython main_fixmatch.py distributed.backend=nccl online_exp_tracking.wandb=true solver.num_epochs=500 \\\n    ssl.confidence_threshold=0.8 ema_decay=0.9 ssl.cta_update_every=15\n``` \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvfdev-5%2Ffixmatch-pytorch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvfdev-5%2Ffixmatch-pytorch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvfdev-5%2Ffixmatch-pytorch/lists"}