示例#1
0
 def compile_onnx(predict_sess, output_graph_def, input_path):
     convert_onnx(
         sess=predict_sess,
         graph_def=output_graph_def,
         input_path=input_path,
         inputs_op="input:0",
         outputs_op="dense_decoded:0"
     )
示例#2
0
 def compile_onnx(predict_sess, output_graph_def, input_path,
                  loss_func: LossFunction):
     convert_onnx(sess=predict_sess,
                  graph_def=output_graph_def,
                  input_path=input_path,
                  inputs_op="input:0",
                  outputs_op="dense_decoded:0" if loss_func
                  == LossFunction.CrossEntropy else "output/predict:0")
示例#3
0
 def compile_onnx(predict_sess, output_graph_def, input_path,
                  loss_func: LossFunction):
     convert_onnx(sess=predict_sess,
                  graph_def=output_graph_def,
                  input_path=input_path,
                  inputs_op="input:0",
                  outputs_op="dense_decoded:0" if loss_func
                  == LossFunction.CrossEntropy else "output/predict:0")
     tf.compat.v1.reset_default_graph()
     tf.compat.v1.keras.backend.clear_session()
     predict_sess.close()