# Convert to Tensor
imagepaths = tf.convert_to_tensor(imagepaths, dtype=tf.string)
labels = tf.convert_to_tensor(labels, dtype=tf.int32)
# Build a TF Queue, shuffle data
image, label = tf.data.Dataset.from_tensor_slices([imagepaths, labels])
So the following code is what I am using with Tensorflow 2, I keep on changing my types that I convert to however it continuously gives me errors no matter which I use. Any Ideas? Below I have listed some of the errors I get:
tensorflow.python.framework.errors_impl.InvalidArgumentError: cannot compute Pack as input #1(zero-based) was expected to be a string tensor but is a int32 tensor [Op:Pack] name: component_0
return ops.EagerTensor(value, handle, device, dtype)
TypeError: Cannot convert provided value to EagerTensor