AttributeError:“模块”对象没有属性“ set_random_seed” [英] AttributeError: 'module' object has no attribute 'set_random_seed'
本文介绍了AttributeError:“模块”对象没有属性“ set_random_seed”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我得到的错误是 AttributeError:当我尝试运行
和我自己的 py-faster-rcnn时,模块对象没有属性 set_random_seed
数据集。
谁能帮我吗?
I got the error which is AttributeError: 'module' object has no attribute 'set_random_seed'
when I tried to run py-faster-rcnn
with my own dataset.
Can anyone help me?
推荐答案
这是概率,因为您使用的是Tensorflow2。因此,您可以简单地使用
This is probability because you are using Tensorflow 2. So, instead you can simply use
import tensorflow as tf
tf.random.set_seed(seed)
这篇关于AttributeError:“模块”对象没有属性“ set_random_seed”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文