cgtuebingen / Neural-PIL

Neural-PIL: Neural Pre-Integrated Lighting for Reflectance Decomposition - NeurIPS2021
https://markboss.me/publication/2021-neural-pil/
MIT License
100 stars 11 forks source link

Batch size must be greater than zero error #4

Open gkouros opened 2 years ago

gkouros commented 2 years ago

Hi. I see the following error when trying to train Neural-PIL on the Car scene. Any idea what is going wrong?

Traceback (most recent call last):
  File "train_neural_pil.py", line 933, in <module>
    main(args)
  File "train_neural_pil.py", line 454, in main
    render_test_example(
  File "train_neural_pil.py", line 884, in render_test_example
    coarse_result, fine_result = model.distributed_call(
  File "/esat/topaz/gkouros/repos/nerf-repos/Neural-PIL/models/neural_pil/neural_pil_model.py", line 186, in distributed_call
    tf.data.Dataset.from_tensor_slices((ray_origins, ray_directions))
  File "/users/visics/gkouros/miniconda3/envs/neuralpil/lib/python3.8/site-packages/tensorflow/python/data/ops/dataset_ops.py", line 1746, in batch
    return BatchDataset(self, batch_size, drop_remainder, name=name)
  File "/users/visics/gkouros/miniconda3/envs/neuralpil/lib/python3.8/site-packages/tensorflow/python/data/ops/dataset_ops.py", line 4953, in __init__
    variant_tensor = gen_dataset_ops.batch_dataset_v2(
  File "/users/visics/gkouros/miniconda3/envs/neuralpil/lib/python3.8/site-packages/tensorflow/python/ops/gen_dataset_ops.py", line 779, in batch_dataset_v2
    _ops.raise_from_not_ok_status(e, name)
  File "/users/visics/gkouros/miniconda3/envs/neuralpil/lib/python3.8/site-packages/tensorflow/python/framework/ops.py", line 7164, in raise_from_not_ok_status
    raise core._status_to_exception(e) from None  # pylint: disable=protected-access
tensorflow.python.framework.errors_impl.InvalidArgumentError: Batch size must be greater than zero. [Op:BatchDatasetV2]

Thank you in advance.

Wanxin-Bao commented 1 year ago

@gkouros Did you solve this problem?

gkouros commented 1 year ago

@gkouros Did you solve this problem?

No unfortunately.