ChowderII
ChowderII

Reputation: 157

TypeError: 'AutoTrackable' object is not callable

I am trying to run inference on my trained model following this tutorial. I am using TF 2.1.0 and I have tried with tf-nightly 2.5.0.dev20201202. But I get TypeError: 'AutoTrackable' object is not callable when I hit the following line detections = detect_fn(input_tensor)
I am aware that 'AutoTrackable' object is not callable in Python exists but I am not using tensorflow hub and I don't understand how the answer could help me.

Thanks

Upvotes: 2

Views: 2612

Answers (2)

Matin H
Matin H

Reputation: 900

Changing detections = detect_fn(input_tensor) to detections = detect_fn.signatures['serving_default'](input_tensor) fixed the issue for me.

Upvotes: 1

Vaibhav G.
Vaibhav G.

Reputation: 169

Try using detect_fn.signatures\['default'](input_tensor)

Upvotes: 1

Related Questions