When running the training I am getting the following error messages
/text-emotion-classification/venv/lib/python3.6/site-packages/tensorflow_core/python/framework/indexed_slices.py:433: UserWarning: Converting sparse IndexedSlices to a dense Tensor of unknown shape. This may consume a large amount of memory.
"Converting sparse IndexedSlices to a dense Tensor of unknown shape. "
ValueError Traceback (most recent call last)
in
2 model_log = model.fit(x_train, y_train, validation_data=(x_val, y_val),
3 epochs=200, batch_size=128,
----> 4 callbacks=[tensorboard, model_checkpoints])
5
6 pandas.DataFrame(model_log.history).to_csv("history-balance.csv")
~/PycharmProjects/text-emotion-classification/venv/lib/python3.6/site-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, validation_freq, max_queue_size, workers, use_multiprocessing, **kwargs)
1211 else:
1212 fit_inputs = x + y + sample_weights
-> 1213 self._make_train_function()
1214 fit_function = self.train_function
1215
~/PycharmProjects/text-emotion-classification/venv/lib/python3.6/site-packages/keras/engine/training.py in _make_train_function(self)
314 training_updates = self.optimizer.get_updates(
315 params=self._collected_trainable_weights,
--> 316 loss=self.total_loss)
317 updates = self.updates + training_updates
318
~/PycharmProjects/text-emotion-classification/venv/lib/python3.6/site-packages/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
~/PycharmProjects/text-emotion-classification/venv/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py in symbolic_fn_wrapper(*args, **kwargs)
73 if _SYMBOLIC_SCOPE.value:
74 with get_graph().as_default():
---> 75 return func(*args, **kwargs)
76 else:
77 return func(*args, **kwargs)
~/PycharmProjects/text-emotion-classification/venv/lib/python3.6/site-packages/keras/optimizers.py in get_updates(self, loss, params)
433
434 # use the new accumulator and the old delta_accumulator
--> 435 update = g * K.sqrt(d_a + self.epsilon) / K.sqrt(new_a + self.epsilon)
436 new_p = p - lr * update
437
~/PycharmProjects/text-emotion-classification/venv/lib/python3.6/site-packages/tensorflow_core/python/ops/variables.py in _run_op(a, *args, **kwargs)
1080 def _run_op(a, *args, **kwargs):
1081 # pylint: disable=protected-access
-> 1082 return tensor_oper(a.value(), *args, **kwargs)
1083
1084 functools.update_wrapper(_run_op, tensor_oper)
~/PycharmProjects/text-emotion-classification/venv/lib/python3.6/site-packages/tensorflow_core/python/ops/math_ops.py in binary_op_wrapper(x, y)
904 try:
905 y = ops.convert_to_tensor_v2(
--> 906 y, dtype_hint=x.dtype.base_dtype, name="y")
907 except TypeError:
908 # If the RHS is not a tensor, it might be a tensor aware object
~/PycharmProjects/text-emotion-classification/venv/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py in convert_to_tensor_v2(value, dtype, dtype_hint, name)
1254 name=name,
1255 preferred_dtype=dtype_hint,
-> 1256 as_ref=False)
1257
1258
~/PycharmProjects/text-emotion-classification/venv/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py in convert_to_tensor(value, dtype, name, as_ref, preferred_dtype, dtype_hint, ctx, accepted_result_types)
1312
1313 if ret is None:
-> 1314 ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
1315
1316 if ret is NotImplemented:
~/PycharmProjects/text-emotion-classification/venv/lib/python3.6/site-packages/tensorflow_core/python/framework/constant_op.py in _constant_tensor_conversion_function(v, dtype, name, as_ref)
315 as_ref=False):
316 _ = as_ref
--> 317 return constant(v, dtype=dtype, name=name)
318
319
~/PycharmProjects/text-emotion-classification/venv/lib/python3.6/site-packages/tensorflow_core/python/framework/constant_op.py in constant(value, dtype, shape, name)
256 """
257 return _constant_impl(value, dtype, shape, name, verify_shape=False,
--> 258 allow_broadcast=True)
259
260
~/PycharmProjects/text-emotion-classification/venv/lib/python3.6/site-packages/tensorflow_core/python/framework/constant_op.py in _constant_impl(value, dtype, shape, name, verify_shape, allow_broadcast)
294 tensor_util.make_tensor_proto(
295 value, dtype=dtype, shape=shape, verify_shape=verify_shape,
--> 296 allow_broadcast=allow_broadcast))
297 dtype_value = attr_value_pb2.AttrValue(type=tensor_value.tensor.dtype)
298 const_tensor = g._create_op_internal( # pylint: disable=protected-access
~/PycharmProjects/text-emotion-classification/venv/lib/python3.6/site-packages/tensorflow_core/python/framework/tensor_util.py in make_tensor_proto(values, dtype, shape, verify_shape, allow_broadcast)
437 else:
438 if values is None:
--> 439 raise ValueError("None values not supported.")
440 # if dtype is provided, forces numpy array to be the type
441 # provided if possible.
ValueError: None values not supported.