Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Image Classification Prediction error

I am implementing the code from https://github.com/googleapis/python-aiplatform/blob/2ce1330488d9e26c58f33c59ac51f47b3bcfdabf/sample... but when I run my code I get the following error:

 

 

 instance = predict.instance.ImageClassificationPredictionInstance(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'function' object has no attribute 'instance'

 

 

 

 

 

Solved Solved
1 1 414
1 ACCEPTED SOLUTION

Hi @hmiura

This error is due to the 'instance' attribute having no defined function in the 'predict. This sometimes occurs when there are attempts to use the 'predict' function with an object that is not a valid image classification model.

You can check out these documentations for further guidance.

Hope this helps.

 

View solution in original post

1 REPLY 1

Hi @hmiura

This error is due to the 'instance' attribute having no defined function in the 'predict. This sometimes occurs when there are attempts to use the 'predict' function with an object that is not a valid image classification model.

You can check out these documentations for further guidance.

Hope this helps.