gpt4 book ai didi

python - Tensorflow_core._api.v2.train没有属性 'slice_input_producer'

转载 作者:行者123 更新时间:2023-12-01 00:17:30 31 4
gpt4 key购买 nike

使用时

image = tf.cast(image, tf.string)
label = tf.cast(label, tf.int32)
# make a input queue
input_queue = tf.train.slice_input_producer([image, label])

在我的 VSCode 中弹出以下错误:

module 'tensorflow_core._api.v2.train' has no attribute 'slice_input_producer' TF version 2.0

您认为唯一的可能就是降级TF版本吗?

最佳答案

您可以尝试使用tf.compat.v1.train.slice_input_ Producer吗?

关于python - Tensorflow_core._api.v2.train没有属性 'slice_input_producer',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59215685/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com