cs-mixer / timm /data /readers /shared_count.py
crrrr30's picture
Upload folder using huggingface_hub
da716ed
raw
history blame contribute delete
303 Bytes
from multiprocessing import Value
class SharedCount:
def __init__(self, epoch: int = 0):
self.shared_epoch = Value('i', epoch)
@property
def value(self):
return self.shared_epoch.value
@value.setter
def value(self, epoch):
self.shared_epoch.value = epoch