Reputation: 21
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?
Upvotes: 2
Views: 4345
Reputation: 1104
This is probability because you are using Tensorflow 2. So, instead you can simply use
import tensorflow as tf
tf.random.set_seed(seed)
Upvotes: 3
Reputation: 1156
I encountered this issue in a different project, and it was because I had installed tensorflow 2 instead of 1. You can work around that by replacing:
import tensorflow as tf
with
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
Upvotes: 0