yu4u / noise2noise

An unofficial and partial Keras implementation of "Noise2Noise: Learning Image Restoration without Clean Data"
MIT License
1.08k stars 234 forks source link

There's some problem in the training process #58

Open FangZuo123 opened 2 years ago

FangZuo123 commented 2 years ago

/usr/lib/python3.7/queue.py in get(self, block, timeout) 169 while not self._qsize(): --> 170 self.not_empty.wait() 171 elif timeout < 0:

/usr/lib/python3.7/threading.py in wait(self, timeout) 295 if timeout is None: --> 296 waiter.acquire() 297 gotit = True

KeyboardInterrupt:

During handling of the above exception, another exception occurred:

ValueError Traceback (most recent call last) /content/drive/MyDrive/n2n/train_US.py in () 131 132 if name == 'main': --> 133 main() 134

/content/drive/MyDrive/n2n/train_US.py in main() 125 validation_data=val_generator, 126 verbose=1, --> 127 callbacks=callbacks) 128 129 np.savez(str(output_path.joinpath("history.npz")), history=hist.history)

/tensorflow-1.15.2/python3.7/keras/legacy/interfaces.py in wrapper(*args, *kwargs) 89 warnings.warn('Update your ' + object_name + ' call to the ' + 90 'Keras 2 API: ' + signature, stacklevel=2) ---> 91 return func(args, **kwargs) 92 wrapper._original_function = func 93 return wrapper

/tensorflow-1.15.2/python3.7/keras/engine/training.py in fit_generator(self, generator, steps_per_epoch, epochs, verbose, callbacks, validation_data, validation_steps, validation_freq, class_weight, max_queue_size, workers, use_multiprocessing, shuffle, initial_epoch) 1730 use_multiprocessing=use_multiprocessing, 1731 shuffle=shuffle, -> 1732 initial_epoch=initial_epoch) 1733 1734 @interfaces.legacy_generator_methods_support

/tensorflow-1.15.2/python3.7/keras/engine/training_generator.py in fit_generator(model, generator, steps_per_epoch, epochs, verbose, callbacks, validation_data, validation_steps, validation_freq, class_weight, max_queue_size, workers, use_multiprocessing, shuffle, initial_epoch) 183 batch_index = 0 184 while steps_done < steps_per_epoch: --> 185 generator_output = next(output_generator) 186 187 if not hasattr(generator_output, 'len'):

/tensorflow-1.15.2/python3.7/keras/utils/data_utils.py in get(self) 623 except Exception: 624 self.stop() --> 625 six.reraise(*sys.exc_info()) 626 627

/usr/local/lib/python3.7/dist-packages/six.py in reraise(tp, value, tb) 701 if value.traceback is not tb: 702 raise value.with_traceback(tb) --> 703 raise value 704 finally: 705 value = None

/tensorflow-1.15.2/python3.7/keras/utils/data_utils.py in get(self) 617 inputs = self.sequence[idx] 618 finally: --> 619 self.queue.task_done() 620 621 if inputs is not None:

/usr/lib/python3.7/queue.py in task_done(self) 72 if unfinished <= 0: 73 if unfinished < 0: ---> 74 raise ValueError('task_done() called too many times') 75 self.all_tasks_done.notify_all() 76 self.unfinished_tasks = unfinished

ValueError: task_done() called too many times/usr/lib/python3.7/queue.py in get(self, block, timeout) 169 while not self._qsize(): --> 170 self.not_empty.wait() 171 elif timeout < 0:

/usr/lib/python3.7/threading.py in wait(self, timeout) 295 if timeout is None: --> 296 waiter.acquire() 297 gotit = True

KeyboardInterrupt:

During handling of the above exception, another exception occurred:

ValueError Traceback (most recent call last) /content/drive/MyDrive/n2n/train_US.py in () 131 132 if name == 'main': --> 133 main() 134

/content/drive/MyDrive/n2n/train_US.py in main() 125 validation_data=val_generator, 126 verbose=1, --> 127 callbacks=callbacks) 128 129 np.savez(str(output_path.joinpath("history.npz")), history=hist.history)

/tensorflow-1.15.2/python3.7/keras/legacy/interfaces.py in wrapper(*args, *kwargs) 89 warnings.warn('Update your ' + object_name + ' call to the ' + 90 'Keras 2 API: ' + signature, stacklevel=2) ---> 91 return func(args, **kwargs) 92 wrapper._original_function = func 93 return wrapper

/tensorflow-1.15.2/python3.7/keras/engine/training.py in fit_generator(self, generator, steps_per_epoch, epochs, verbose, callbacks, validation_data, validation_steps, validation_freq, class_weight, max_queue_size, workers, use_multiprocessing, shuffle, initial_epoch) 1730 use_multiprocessing=use_multiprocessing, 1731 shuffle=shuffle, -> 1732 initial_epoch=initial_epoch) 1733 1734 @interfaces.legacy_generator_methods_support

/tensorflow-1.15.2/python3.7/keras/engine/training_generator.py in fit_generator(model, generator, steps_per_epoch, epochs, verbose, callbacks, validation_data, validation_steps, validation_freq, class_weight, max_queue_size, workers, use_multiprocessing, shuffle, initial_epoch) 183 batch_index = 0 184 while steps_done < steps_per_epoch: --> 185 generator_output = next(output_generator) 186 187 if not hasattr(generator_output, 'len'):

/tensorflow-1.15.2/python3.7/keras/utils/data_utils.py in get(self) 623 except Exception: 624 self.stop() --> 625 six.reraise(*sys.exc_info()) 626 627

/usr/local/lib/python3.7/dist-packages/six.py in reraise(tp, value, tb) 701 if value.traceback is not tb: 702 raise value.with_traceback(tb) --> 703 raise value 704 finally: 705 value = None

/tensorflow-1.15.2/python3.7/keras/utils/data_utils.py in get(self) 617 inputs = self.sequence[idx] 618 finally: --> 619 self.queue.task_done() 620 621 if inputs is not None:

/usr/lib/python3.7/queue.py in task_done(self) 72 if unfinished <= 0: 73 if unfinished < 0: ---> 74 raise ValueError('task_done() called too many times') 75 self.all_tasks_done.notify_all() 76 self.unfinished_tasks = unfinished

ValueError: task_done() called too many times