Hi,
I’ve been testing and searching high and low, but keep running into this:
- trained an image classifier on about 1300 images, for 2 classes
- I use this function to create the training and validation sets:
train_ds = tf.keras.utils.image_dataset_from_directory(
data_dir,
validation_split = 0.2,
subset = "training",
seed = 123,
image_size = (img_height, img_width),
batch_size = batch_size)
(same call for the validation set, except subset = “validation”)
- I train the model, then run predict on the validation set:
predictions = probability_model.predict(val_ds)
and then save the validation set filenames and the two class probabilities to a file.
- I then save the model, and run tensorflow_model_server with it (installed from
tensorflow-model-serving-1.14-1.0-1.x86_64.rpm
)
A separate script then reads the validation set filenames, and sends these to the tensorflow server. I am expecting this server to return the same probabilities, but it doesn’t.
What could be the reason?
Many thanks in advance