Download pytorch-image-models/timm/data/readers/shared_count.py from datacomp/ImageNetTraining0.0-1over32: direct link, hf CLI and curl.
- Browser
- Download file 303 Bytes
-
https://huggingface.co/datasets/datacomp/ImageNetTraining0.0-1over32/resolve/main/pytorch-image-models/timm/data/readers/shared_count.py
- Command line
-
hf download hf://datasets/datacomp/ImageNetTraining0.0-1over32/pytorch-image-models/timm/data/readers/shared_count.py
-
curl -L -o shared_count.py https://huggingface.co/datasets/datacomp/ImageNetTraining0.0-1over32/resolve/main/pytorch-image-models/timm/data/readers/shared_count.py
303 Bytes
| from multiprocessing import Value | |
| class SharedCount: | |
| def __init__(self, epoch: int = 0): | |
| self.shared_epoch = Value('i', epoch) | |
| def value(self): | |
| return self.shared_epoch.value | |
| def value(self, epoch): | |
| self.shared_epoch.value = epoch | |