Spaces:
Running on Zero
Running on Zero
Download timm/data/readers/shared_count.py from hugging-apps/progresvit-classify: direct link, hf CLI and curl.
- Browser
- Download file 303 Bytes
-
https://huggingface.co/spaces/hugging-apps/progresvit-classify/resolve/main/timm/data/readers/shared_count.py
- Command line
-
hf download hf://spaces/hugging-apps/progresvit-classify/timm/data/readers/shared_count.py
-
curl -L -o shared_count.py https://huggingface.co/spaces/hugging-apps/progresvit-classify/resolve/main/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 | |