Skip to content

ZeroDivisionError while running train.py  #7

Description

@TuhinKundu

Have setup the repository on Google Colab and uploaded train, test and validation (of 100 random images from train set) and tried running train.py which resulted in the following error. Any help?

------------ Options -------------
batch_size: 64
beta1: 0.9
beta2: 0.999
channels: 1
checkpoints_path: ./checkpoints
cuda: True
dataset_path: ./dataset
debug: False
ensemble: 1
epochs: 30
gpu_ids: 0
log_interval: 50
lr: 0.001
network: 0
no_cuda: False
patch_stride: 256
seed: 1
test_batch_size: 64
testset_path:
-------------- End ----------------

Loading "patch-wise" model...
Start training patch-wise network: 2018/12/28 16:59

/content/ICIAR2018/src/datasets.py:28: RuntimeWarning: invalid value encountered in long_scalars
self.augment_size = np.prod(self.shape) / len(labels)
Traceback (most recent call last):
File "train.py", line 14, in
pw_model.train()
File "/content/ICIAR2018/src/models.py", line 56, in train
best = self.validate(verbose=False)
File "/content/ICIAR2018/src/models.py", line 151, in validate
test_loss /= len(test_loader.dataset)
ZeroDivisionError: division by zero

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions