dhlab-epfl / dhSegment

Generic framework for historical document processing
https://dhlab-epfl.github.com/dhSegment
GNU General Public License v3.0
370 stars 116 forks source link

Getting error "tensorflow.python.framework.errors_impl.InternalError: Failed to create session" #50

Open kapitsa2811 opened 4 years ago

kapitsa2811 commented 4 years ago

When I run the code I get an error at line

    estimator.train(input.input_fn(train_input,
                                   input_label_dir=train_labels_input,
                                   num_epochs=training_params.evaluate_every_epoch,
                                   batch_size=training_params.batch_size,
                                   data_augmentation=training_params.data_augmentation,
                                   make_patches=training_params.make_patches,
                                   image_summaries=True,
                                   params=_config,
                                   num_threads=32))

The error is: Traceback (most recent calls WITHOUT Sacred internals): File "/home/kapitsa/PycharmProjects/objectLocalization/DocumentTableSeg/IeeeTransc/dhSegment/train.py", line 115, in run num_threads=32)) File "/home/kapitsa/anaconda3/lib/python3.6/site-packages/tensorflow/python/estimator/estimator.py", line 366, in train loss = self._train_model(input_fn, hooks, saving_listeners) File "/home/kapitsa/anaconda3/lib/python3.6/site-packages/tensorflow/python/estimator/estimator.py", line 1119, in _train_model return self._train_model_default(input_fn, hooks, saving_listeners) File "/home/kapitsa/anaconda3/lib/python3.6/site-packages/tensorflow/python/estimator/estimator.py", line 1135, in _train_model_default saving_listeners) File "/home/kapitsa/anaconda3/lib/python3.6/site-packages/tensorflow/python/estimator/estimator.py", line 1333, in _train_with_estimator_spec log_step_count_steps=self._config.log_step_count_steps) as mon_sess: File "/home/kapitsa/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/monitored_session.py", line 415, in MonitoredTrainingSession stop_grace_period_secs=stop_grace_period_secs) File "/home/kapitsa/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/monitored_session.py", line 826, in init stop_grace_period_secs=stop_grace_period_secs) File "/home/kapitsa/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/monitored_session.py", line 549, in init self._sess = _RecoverableSession(self._coordinated_creator) File "/home/kapitsa/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/monitored_session.py", line 1012, in init _WrappedSession.init(self, self._create_session()) File "/home/kapitsa/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/monitored_session.py", line 1017, in _create_session return self._sess_creator.create_session() File "/home/kapitsa/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/monitored_session.py", line 706, in create_session self.tf_sess = self._session_creator.create_session() File "/home/kapitsa/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/monitored_session.py", line 477, in create_session init_fn=self._scaffold.init_fn) File "/home/kapitsa/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/session_manager.py", line 281, in prepare_session config=config) File "/home/kapitsa/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/session_manager.py", line 184, in _restore_checkpoint sess = session.Session(self._target, graph=self._graph, config=config) File "/home/kapitsa/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1563, in init super(Session, self).init(target, graph, config=config) File "/home/kapitsa/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 633, in init self._session = tf_session.TF_NewSession(self._graph._c_graph, opts) tensorflow.python.framework.errors_impl.InternalError: Failed to create session.