LWT3437 / LANet

Source Code for “LANet: A Luminance Attentive Network with Scale Invariance for HDR Image Reconstruction” (PG 2021)
16 stars 3 forks source link

Issue while running the code for training #2

Open darthgera123 opened 2 years ago

darthgera123 commented 2 years ago

Hi Wonderful work. While running the code for training im getting this error:

Traceback (most recent call last):
  File "/home/aakash.kt/anaconda3/envs/tf-gpu/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/home/aakash.kt/anaconda3/envs/tf-gpu/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/home/aakash.kt/Pano_HDR/LANet/LANet/src/model.py", line 334, in enqueue_frames
    coord.request_stop(e)
  File "/home/aakash.kt/anaconda3/envs/tf-gpu/lib/python3.6/site-packages/tensorflow/python/training/coordinator.py", line 213, in request_stop
    six.reraise(*sys.exc_info())
  File "/home/aakash.kt/anaconda3/envs/tf-gpu/lib/python3.6/site-packages/six.py", line 719, in reraise
    raise value
  File "/home/aakash.kt/Pano_HDR/LANet/LANet/src/model.py", line 320, in enqueue_frames
    self.sess.run(self.q_frames.close())
  File "/home/aakash.kt/anaconda3/envs/tf-gpu/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 877, in run
    run_metadata_ptr)
  File "/home/aakash.kt/anaconda3/envs/tf-gpu/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1100, in _run
    feed_dict_tensor, options, run_metadata)
  File "/home/aakash.kt/anaconda3/envs/tf-gpu/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1272, in _do_run
    run_metadata)
  File "/home/aakash.kt/anaconda3/envs/tf-gpu/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1291, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.CancelledError: Session has been closed.

I am unable to figure this out, please help @LWT3437

darthgera123 commented 2 years ago

It seems the issue is with the multithreaded approach of reading the files from the dataloader. The error is coming when it is trying to load the images. Is there a version which is not multithreaded?

LWT3437 commented 2 years ago

@darthgera123 Thank you for taking an interest in our work. I'm sorry for that we didn't have a non-multithreaded version, but you can try to set the loading threads number from 4 to 1 in src/model.py: 151.

darthgera123 commented 2 years ago

@LWT3437 same issue still coming. Tried with different tensorflow versions as well :(

LWT3437 commented 2 years ago

@darthgera123 Oh no, I guess the data processing you did doesn't match the training code. However, I don't have the conditions for debugging anymore, so I am afraid it is difficult to help you solve this error QAQ

Actually we didn't provide a guide on how to retrain and don't recommend using this code for retraining since it was written a long time ago and is now outdated. The core ideas of our paper is calibration preprocessing and scale-invariant loss, I suggest re-implementing based on these two ideas, if you want to do a further work.

r3dAngel commented 9 months ago

@darthgera123 Hi, I also encountered this problem, have you solved it?

darthgera123 commented 9 months ago

@darthgera123 Hi, I also encountered this problem, have you solved it?

Not really. I just reimplemented a version here

r3dAngel commented 9 months ago

@darthgera123 Hi, I also encountered this problem, have you solved it?

Not really. I just reimplemented a version here

Thank you very much for your prompt response and the valuable work you contribute to the project.