AttributeError:'模块'对象没有属性'set_random_seed'

问题描述 投票:1回答:1

当我尝试使用自己的AttributeError: 'module' object has no attribute 'set_random_seed'运行py-faster-rcnn时出现dataset.错误谁能帮我吗?

caffe
1个回答
0
投票

我在另一个项目中遇到此问题,这是因为我安装了tensorflow 2而不是1。您可以通过替换来解决此问题:

import tensorflow as tf

with

import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
© www.soinside.com 2019 - 2024. All rights reserved.