Python 转换后的模型没有';不显示在任何目录中

Python 转换后的模型没有';不显示在任何目录中,python,tensorflow,keras,Python,Tensorflow,Keras,我正在尝试转换tflite模型,但它正在消失。我的代码怎么了 import tensorflow as tf converter = tf.lite.TFLiteConverter.from_saved_model('./exported-models/my_model/saved_model') converter.optimizations = [tf.lite.Optimize.DEFAULT] tflite_quant_model = converter.convert() # Sav

我正在尝试转换tflite模型,但它正在消失。我的代码怎么了

import tensorflow as tf
converter = tf.lite.TFLiteConverter.from_saved_model('./exported-models/my_model/saved_model')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
tflite_quant_model = converter.convert()

# Save the model.
with open('model.tflite', 'wb') as f:
  f.write(tflite_quant_model)
我很确定转换器运行成功,但文件不会出现在任何地方

下面是命令行的结尾

sor<1xi32>) -> tensor<i32>
  %381 = "tfl.sub"(%380, %cst_10) {fused_activation_function = "NONE"} : (tensor<i32>, tensor<i32>) -> tensor<i32>
  %382 = "tfl.greater"(%381, %cst_23) : (tensor<i32>, tensor<i32>) -> tensor<i1>
  %383 = "tfl.select"(%382, %cst_10, %cst_15) : (tensor<i1>, tensor<i32>, tensor<i32>) -> tensor<i32>
  %384 = "tfl.strided_slice"(%379, %cst_249, %cst_248, %cst_249) {begin_mask = 0 : i32, ellipsis_mask = 0 : i32, end_mask = 0 : i32, new_axis_mask = 0 : i32, shrink_axis_mask = 1 : i32} : (tensor<2xi32>, tensor<1xi32>, tensor<1xi32>, tensor<1xi32>) -> tensor<i32>
  %385 = "tfl.sub"(%384, %cst_9) {fused_activation_function = "NONE"} : (tensor<i32>, tensor<i32>) -> tensor<i32>
  %386 = "tfl.greater"(%385, %cst_23) : (tensor<i32>, tensor<i32>) -> tensor<i1>
  %387 = "tfl.select"(%386, %cst_9, %cst_15) : (tensor<i1>, tensor<i32>, tensor<i32>) -> tensor<i32>
  %388 = "tfl.pack"(%383, %387) {axis = 0 : i32, values_count = 2 : i32} : (tensor<i32>, tensor<i32>) -> tensor<2xi32>
  %389 = "tfl.slice"(%378, %cst_12, %388) : (tensor<?x4xf32>, tensor<2xi32>, tensor<2xi32>) -> tensor<?x?xf32>
  %390 = "tfl.shape"(%389) : (tensor<?x?xf32>) -> tensor<2xi32>
  %391 = "tfl.strided_slice"(%390, %cst_247, %cst_249, %cst_249) {begin_mask = 0 : i32, ellipsis_mask = 0 : i32, end_mask = 0 : i32, new_axis_mask = 0 : i32, shrink_axis_mask = 1 : i32} : (tensor<2xi32>, tensor<1xi32>, tensor<1xi32>, tensor<1xi32>) -> tensor<i32>
  %392 = "tfl.sub"(%cst_10, %391) {fused_activation_function = "NONE"} : (tensor<i32>, tensor<i32>) -> tensor<i32>
  %393 = "tfl.strided_slice"(%390, %cst_249, %cst_248, %cst_249) {begin_mask = 0 : i32, ellipsis_mask = 0 : i32, end_mask = 0 : i32, new_axis_mask = 0 : i32, shrink_axis_mask = 1 : i32} : (tensor<2xi32>, tensor<1xi32>, tensor<1xi32>, tensor<1xi32>) -> tensor<i32>
  %394 = "tfl.sub"(%cst_9, %393) {fused_activation_function = "NONE"} : (tensor<i32>, tensor<i32>) -> tensor<i32>
  %395 = "tfl.pack"(%392, %394) {axis = 0 : i32, values_count = 2 : i32} : (tensor<i32>, tensor<i32>) -> tensor<2xi32>
  %396 = "tfl.pack"(%cst_12, %395) {axis = 1 : i32, values_count = 2 : i32} : (tensor<2xi32>, tensor<2xi32>) -> tensor<2x2xi32>
  %397 = "tfl.pad"(%389, %396) : (tensor<?x?xf32>, tensor<2x2xi32>) -> tensor<?x?xf32>
  %398 = "tfl.pack"(%397) {axis = 0 : i32, values_count = 1 : i32} : (tensor<?x?xf32>) -> tensor<1x?x?xf32>
  "std.return"(%302, %398, %376, %183, %319, %167, %359, %337) : (tensor<1xf32>, tensor<1x?x?xf32>, tensor<1x?xf32>, tensor<1x51150x4xf32>, tensor<1x?xf32>, tensor<1x51150x4xf32>, tensor<1x?x?xf32>, tensor<1x?xf32>) -> ()
}) {arg0 = {tf_saved_model.index_path = ["input_tensor"]}, result0 = {tf_saved_model.index_path = ["num_detections"]}, result1 = {tf_saved_model.index_path = ["detection_boxes"]}, result2 = {tf_saved_model.index_path = ["detection_classes"]}, result3 = {tf_saved_model.index_path = ["raw_detection_scores"]}, result4 = {tf_saved_model.index_path = ["detection_scores"]}, result5 = {tf_saved_model.index_path = ["raw_detection_boxes"]}, result6 = {tf_saved_model.index_path = ["detection_multiclass_scores"]}, result7 = {tf_saved_model.index_path = ["detection_anchor_indices"]}, sym_name = "main", tf.entry_function = {control_outputs = "", inputs = "serving_default_input_tensor:0", outputs = "StatefulPartitionedCall:5,StatefulPartitionedCall:1,StatefulPartitionedCall:2,StatefulPartitionedCall:7,StatefulPartitionedCall:4,StatefulPartitionedCall:6,StatefulPartitionedCall:3,StatefulPartitionedCall:0"}, tf_saved_model.exported_names = ["serving_default"], type = (tensor<1x?x?x3xui8>) -> (tensor<1xf32>, tensor<1x?x?xf32>, tensor<1x?xf32>, tensor<1x51150x4xf32>, tensor<1x?xf32>, tensor<1x51150x4xf32>, tensor<1x?x?xf32>, tensor<1x?xf32>)} : () -> ()
sor)->张量
%381=“tfl.sub”(%380,%cst_10){fused_activation_function=“NONE”}:(张量,张量)->张量
%382=“tfl.更大”(%381,%cst_23):(张量,张量)->张量
%383=“tfl.选择”(%382,%cst_10,%cst_15):(张量,张量,张量)->张量
%384=“tfl.stridded_slice”(%379%cst_249%cst_248%cst_249){begin_mask=0:i32,省略号_mask=0:i32,end_mask=0:i32,new_axis_mask=0:i32,shrink_axis_mask=1:i32}:(张量,张量,张量,张量,张量)->张量
%385=“tfl.sub”(%384,%cst_9){fused_activation_function=“NONE”}:(张量,张量)->张量
%386=“tfl.更大”(%385,%cst_23):(张量,张量)->张量
%387=“tfl.选择”(%386,%cst_9,%cst_15):(张量,张量,张量)->张量
%388=“tfl.pack”(%383,%387){axis=0:i32,values\u count=2:i32}:(张量,张量)->tensor

%389=“tfl.slice”(%378,%cst_12,%388):(Tensorth此输出是不寻常的..可能是应该写入文件的内容正在被打印…尝试以文本模式
w
而不是
wb
哪个是二进制模式将模型保存到哪个目录?