#!/usr/bin/python# -*- coding: UTF-8 -*-import csvwith open('file.csv','a',newline='') as csvfile: spamwriter = csv.writer(csvfile, dialect='excel') with open('data_2016_1.txt', 'rb') as filein: for line in filein: line_list = line.decode().split('\t…
由于项目需要,需要将TensorFlow保存的模型从ckpt文件转换为pb文件. import os from tensorflow.python import pywrap_tensorflow from net2use import inception_resnet_v2_small#这里使用自己定义的模型函数即可 import tensorflow as tf if __name__=='__main__': pb_file = "./model/output.pb" ckpt_…