2 Star 1 Fork 0

deeplearningrepos/gpt-neo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
export.py 501 Bytes
一键复制 编辑 原始数据 按行查看 历史
connor 提交于 2020-12-07 20:01 +08:00 . Add exporting
import tensorflow.compat.v1 as tf
def export_model(estimator, export_dir, params,
checkpoint_path=None):
def serving_input_receiver_fn():
t = tf.placeholder(dtype=tf.int64,
shape=[1, params["n_ctx"]],
name='input_example_tensor')
return tf.estimator.export.ServingInputReceiver(t, t)
return estimator.export_saved_model(
export_dir, serving_input_receiver_fn, checkpoint_path=checkpoint_path)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/deeplearningrepos/gpt-neo.git
git@gitee.com:deeplearningrepos/gpt-neo.git
deeplearningrepos
gpt-neo
gpt-neo
master

搜索帮助