Deploying an overridden entry-level model in Google Cloud Learning

I manage to retrain my specific classification model using a common initial model, following this tutorial . Now I would like to deploy it on a Google Cloud training device after this steps .

I have already managed to export it as MetaGraph, but I cannot get the correct inputs and outputs.

Using it locally, my entry point to the chart DecodeJpeg/contents:0, which is served with a jpeg image in binary format. The result is my predictions.

Code I use locally (which works):

softmax_tensor = sess.graph.get_tensor_by_name('final_result:0')
predictions = sess.run(softmax_tensor,{'DecodeJpeg/contents:0': image_data})

If the input tensor will be DecodeJpeg? What changes should I make if I would like to have base64 imageas input?

I defined the output as:

outputs = {'prediction':softmax_tensor.name}

.

+3
2

"DecodeJpeg/contents: 0", - :

inputs = {'image': 'DecodeJpeg/contents:0')
outputs = {'prediction': 'final_result:0')

( preparing .)

, , , :

gs://my_bucket/path/to/model/export.meta
gs://my_bucket/path/to/model/checkpoint*

gs://my_bucket/path/to/model deployment_uri.

, , base64 . ( "", "b64", , -64):

{'instances': [{'b64': base64.b64encode(image)}]}
+1

Source: https://habr.com/ru/post/1662169/


All Articles