将TensorFlow估算器导出为单个.pb文件吗?

现在,我像这样导出我的张量流估计器:

def receiver():
    shape = (None,estimator.params['n_channels'])
    features = {
        'waveform': tf.compat.v1.placeholder(tf.float32,shape=shape),'audio_id': tf.compat.v1.placeholder(tf.string)}
    return tf.estimator.export.ServingInputReceiver(features,features)

estimator.export_saved_model(directory,receiver)

但是,这会生成一个小的.pb文件和一个带有大 variables.data-00000-of-00001 文件的子文件夹 ./ variables 和一个 variables.index 文件。

是否有其他命令可以让我仅将估算器导出为单个大型.pb文件,而不包含所需的所有内容?这样会更方便使用和重新分发。

mycindy123 回答:将TensorFlow估算器导出为单个.pb文件吗?

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2899946.html

大家都在问