tf.data.dataset存储数组列错误
有什么方法可以将存储在pandas dataframe形成的tf.data.dataset中,每个单元格对应于浮子数组?
我有一个pandas dataframe,其中一列在每行中都有一个浮子列表,然后以以下方式将其转换为tf.data.dataset,以将其发送到TensorFlow模型:
ds = tf.data.Dataset.from_tensor_slices((dict(dataframe)))
但是我无法存储数组列,有什么办法吗?
valueerror:无法将numpy数组转换为张量(未支撑对象类型numpy.ndarray)。
Is there any way to store inside a tf.data.Dataset formed from a pandas dataframe, a column where each cell corresponds to an array of floats?
I have a pandas dataframe where a column has a list of floats for each row, and I transform it to a tf.data.Dataset in the following way to send it to a Tensorflow model:
ds = tf.data.Dataset.from_tensor_slices((dict(dataframe)))
But I can't store the array column, is there any way to do it?
ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type numpy.ndarray).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论