I am using tensorflow serving to serve a pre-trained model. The strange thing is when I input same data for this model, I got different outcome each time.
I thought it might be my problem at variable initialize, I am wondering is there any clue I debug my model, or how can I find the cause, thanks.
Two common problems:
To address (1), use this instead:
To address (2), be sure that you aren't directly exporting your training graph. You need to build a new graph for prediction/serving. If you are using the
tf.estimator
framework, then you will only conditionally add dropout layers whenmode
istf.estimator.ModeKeys.TRAIN
.