0

I have a Frozen graph for SSD Mobilnet V2 and trying to compute the following gradient

img_input = graph.get_tensor_by_name('image_tensor:0')
detection_scores = graph.get_tensor_by_name('detection_scores:0')
grads = tf.gradients(detection_scores,img_input)

But I am getting the error "AttributeError: 'NoneType' object has no attribute 'outer_context'" for Exit operation in the while loop of the graph. The while context where the Exit operation belongs is returning as None.

Any help is really appreciated. I am stuck with this issue for more than 2 weeks. The frozen graph is obtained by training the model using Tensorflow Object Detection API using TF1.

  • You should ask "Why is some variable `None`?" instead. In any case, extract a [mcve] first, maybe you find the error that way and it's required for a good question here. As a new user, also take the [tour] and read [ask]. – Ulrich Eckhardt Jan 05 '22 at 17:50
  • Does this answer your question? [Why do I get AttributeError: 'NoneType' object has no attribute 'something'?](https://stackoverflow.com/questions/8949252/why-do-i-get-attributeerror-nonetype-object-has-no-attribute-something) – Ulrich Eckhardt Jan 05 '22 at 17:53

0 Answers0