Trouble querying exported model

So… I basically followed the tutorial on creating a simple model from scratch ( and then exported it. I’m serving it with the docker methodology from here ( and querying the REST API using a python script that basically converts the image to the expected list format of the :predict API. The problem I have, is that I then get an error that goes:
{'error': 'Must provide as many biases as the last dimension of the input tensor: [3] vs. [1,255,255,4]\n\t [[{{node model_4/training_model/pre_trained_vg_g16_vg_g16_1_keras_1/BiasAdd}}]]'}
Perceptilabs seems to have trained the model correctly, but I guess was expecting to be able to call the :predict api with one of my training images and get a prediction. I’m probably doing something wrong, but I don’t know enough about all of this to know where to look…

Look like I was missing that first dimension on my numpy array. np.expand_dims(img, axis=0) to add the batch dimension resulted in predictions outputing correctly

1 Like

Hi @elementorange,
Welcome to the forum!

Great to hear that you got it running! :slight_smile: