It seems that no GPU is detected on your system in:
self.snapshot_step = config.LOG.SNAPSHOT_STEP // torch.cuda.device_count()

which would trigger a division by 0.
Your system either doesn’t have a GPU, in which case you should remove the device_count() call and fix the code appropriately, or the GPU is not detected if you’ve installed the PyTorch CPU binaries or e.g. are using a too old NVIDIA driver.