Train a tensorflow model in python knode

Hi,
I load some images and convert them into data rows with “Image to Datarow” node.

In my python node, I load the data as train and test data:

If I print out the data with

print(train_data)

I get this:

Now, training my network

model.fit(train_data, train_col, epochs=100, validation_data=(test_data, test_col))

throws an error:

ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type numpy.ndarray).

I guess, I have to convert or reshape the data somehow. How can I do that?

Thank you.

you could try to convert to tensors
sth like this
X_test = tf.convert_to_tensor(X_test, dtype = tf.float32)
br

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.