keras-contrib
keras-contrib copied to clipboard
InvalidArgumentError: 2 root error(s) found.
W0822 06:42:38.771386 140637022361472 deprecation_wrapper.py:119] From /usr/local/lib/python3.6/dist-packages/keras/optimizers.py:790: The name tf.train.Optimizer is deprecated. Please use tf.compat.v1.train.Optimizer instead.
Compiled Train on 1400 samples, validate on 600 samples Epoch 1/5
InvalidArgumentError Traceback (most recent call last)
4 frames
/usr/local/lib/python3.6/dist-packages/keras/engine/training.py in fit(self, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, **kwargs) 1037 initial_epoch=initial_epoch, 1038 steps_per_epoch=steps_per_epoch, -> 1039 validation_steps=validation_steps) 1040 1041 def evaluate(self, x=None, y=None,
/usr/local/lib/python3.6/dist-packages/keras/engine/training_arrays.py in fit_loop(model, f, ins, out_labels, batch_size, epochs, verbose, callbacks, val_f, val_ins, shuffle, callback_metrics, initial_epoch, steps_per_epoch, validation_steps) 197 ins_batch[i] = ins_batch[i].toarray() 198 --> 199 outs = f(ins_batch) 200 outs = to_list(outs) 201 for l, o in zip(out_labels, outs):
/usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py in call(self, inputs) 2713 return self._legacy_call(inputs) 2714 -> 2715 return self._call(inputs) 2716 else: 2717 if py_any(is_tensor(x) for x in inputs):
/usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py in _call(self, inputs) 2673 fetched = self._callable_fn(*array_vals, run_metadata=self.run_metadata) 2674 else: -> 2675 fetched = self._callable_fn(*array_vals) 2676 return fetched[:len(self.outputs)] 2677
/usr/local/lib/python3.6/dist-packages/tensorflow/python/client/session.py in call(self, *args, **kwargs) 1456 ret = tf_session.TF_SessionRunCallable(self._session._session, 1457 self._handle, args, -> 1458 run_metadata_ptr) 1459 if run_metadata: 1460 proto_data = tf_session.TF_GetBuffer(run_metadata_ptr)
InvalidArgumentError: 2 root error(s) found. (0) Invalid argument: Index out of range using input dim 3; input has only 3 dims [[{{node loss/output_loss/strided_slice}}]] [[loss/mul/_823]] (1) Invalid argument: Index out of range using input dim 3; input has only 3 dims [[{{node loss/output_loss/strided_slice}}]] 0 successful operations. 0 derived errors ignored.
Please, I need Help. I faced the above error during training a model.
Similar error
InvalidArgumentError Traceback (most recent call last)
3 frames
/usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py in call(self, inputs) 2977 return self._legacy_call(inputs) 2978 -> 2979 return self._call(inputs) 2980 else: 2981 if py_any(is_tensor(x) for x in inputs):
/usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py in _call(self, inputs) 2935 fetched = self._callable_fn(*array_vals, run_metadata=self.run_metadata) 2936 else: -> 2937 fetched = self._callable_fn(*array_vals) 2938 return fetched[:len(self.outputs)] 2939
/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/client/session.py in call(self, *args, **kwargs) 1470 ret = tf_session.TF_SessionRunCallable(self._session._session, 1471 self._handle, args, -> 1472 run_metadata_ptr) 1473 if run_metadata: 1474 proto_data = tf_session.TF_GetBuffer(run_metadata_ptr)
InvalidArgumentError: 2 root error(s) found. (0) Invalid argument: Input to reshape is a tensor with 3686400 values, but the requested shape has 921600 [[{{node reshape_2/Reshape}}]] (1) Invalid argument: Input to reshape is a tensor with 3686400 values, but the requested shape has 921600 [[{{node reshape_2/Reshape}}]] [[reshape_4/Reshape/_193]] 0 successful operations. 0 derived errors ignored.
Any solution to resolve the error?