Do not worry - you do not need to retrain your model. However, little work remains to be done. You are about to create a new (adjusted) service schedule, load breakpoints into this graph, and then export this schedule.
, , placeholder, , (, CloudML). :
x = tf.placeholder(tf.float32)
y = foo(x)
...
:
with tf.Graph().as_default() as new_graph:
x = tf.placeholder(tf.float32, shape=[None])
y = foo(x)
saver = tf.train.Saver()
inputs = {"x": tf.saved_model.utils.build_tensor_info(x)}
outputs = {"y": tf.saved_model.utils.build_tensor_info(y)}
signature = tf.saved_model.signature_def_utils.build_signature_def(
inputs=inputs,
outputs=outputs,
method_name=tf.saved_model.signature_constants.PREDICT_METHOD_NAME
)
with tf.Session(graph=new_graph) as session:
vars_path = os.path.join(old_export_dir, 'variables', 'variables')
saver.restore(session, vars_path)
b = builder.SavedModelBuilder(new_export_dir)
b.add_meta_graph_and_variables(session, ['serving_default'], signature)
b.save()