Skip to content

generator_collection.py batch_size issue #2

@ZyHUpenn

Description

@ZyHUpenn

Hi, thank you very much for sharing the DeepVID code. When trying DeepVID for training, I meet the error reporting which is:

of Images: 0

num_workers: 20
Building generators
0it [00:00, ?it/s]
Traceback (most recent call last):
File "/home/hziyi/DeepVID-master/DeepVID-master/./scripts/dipn2v_multi_train.py", line 180, in
global_train_generator = CollectorGenerator(list_train_generator)
File "/home/hziyi/DeepVID-master/DeepVID-master/source/generator_collection.py", line 448, in init
self.batch_size = self.generator_list[0].batch_size
IndexError: list index out of range

In your code, I found seems it will create json file by itself so I don't know where can I modify the content in json file. Also, I checked the created training.json, there seems already contain the batch_size term:
{"type": "trainer", "name": "core_trainer", "run_uid": "20211109-095033", "batch_size": 4, "steps_per_epoch": 360, "period_save": 100, "save_image_period": 50, "apply_learning_decay": 0, "nb_times_through_data": 3, "learning_rate": 5e-06, "loss": "mse_with_mask", "nb_workers": 28, "model_string": "20211109-095033_DIPN2VGenerator_replace_0.1_mse_with_mask_pre_post_frame_3_multi", "output_dir": "/projectnb2/rise2019/cl6/Voltage_Imaging/scripts/../results/20211109-095033_DIPN2VGenerator_replace_0.1_mse_with_mask_pre_post_frame_3_multi"}

Can you help with the issue? I only used your training command $ python ./scripts/dipn2v_multi_train.py.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions