Model: "sequential_7"
Layer (type) Output Shape Param #
embedding_7 (Embedding) (None, 1024, 32) 2016
dropout_14 (Dropout) (None, 1024, 32) 0
lstm_7 (LSTM) (None, 64) 24832
dropout_15 (Dropout) (None, 64) 0
dense_7 (Dense) (None, 1) 65
Total params: 26,913
Trainable params: 26,913
Non-trainable params: 0
None
Traceback (most recent call last):
File "", line 94, in
train(csv_file)
File "", line 71, in train
model.fit(X_train, Y_train, validation_split=0.25, epochs=3, batch_size=128, callbacks=[tb_callback])
File "C:\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\training.py", line 728, in fit
use_multiprocessing=use_multiprocessing)
File "C:\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\training_v2.py", line 224, in fit
distribution_strategy=strategy)
File "C:\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\training_v2.py", line 528, in _process_training_inputs
distribution_strategy=distribution_strategy)
File "C:\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\data_adapter.py", line 321, in init
dataset_ops.DatasetV2.from_tensors(inputs).repeat()
File "C:\Anaconda3\lib\site-packages\tensorflow_core\python\data\ops\dataset_ops.py", line 414, in from_tensors
return TensorDataset(tensors)
File "C:\Anaconda3\lib\site-packages\tensorflow_core\python\data\ops\dataset_ops.py", line 2335, in init
element = structure.normalize_element(element)
File "C:\Anaconda3\lib\site-packages\tensorflow_core\python\data\util\structure.py", line 111, in normalize_element
ops.convert_to_tensor(t, name="component_%d" % i))
File "C:\Anaconda3\lib\site-packages\tensorflow_core\python\framework\ops.py", line 1184, in convert_to_tensor
return convert_to_tensor_v2(value, dtype, preferred_dtype, name)
File "C:\Anaconda3\lib\site-packages\tensorflow_core\python\framework\ops.py", line 1242, in convert_to_tensor_v2
as_ref=False)
File "C:\Anaconda3\lib\site-packages\tensorflow_core\python\framework\ops.py", line 1296, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "C:\Anaconda3\lib\site-packages\tensorflow_core\python\framework\tensor_conversion_registry.py", line 52, in _default_conversion_function
return constant_op.constant(value, dtype, name=name)
File "C:\Anaconda3\lib\site-packages\tensorflow_core\python\framework\constant_op.py", line 227, in constant
allow_broadcast=True)
File "C:\Anaconda3\lib\site-packages\tensorflow_core\python\framework\constant_op.py", line 235, in _constant_impl
t = convert_to_eager_tensor(value, ctx, dtype)
File "C:\Anaconda3\lib\site-packages\tensorflow_core\python\framework\constant_op.py", line 96, in convert_to_eager_tensor
return ops.EagerTensor(value, ctx.device_name, dtype)
ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type int).