Open hamanfang opened 4 years ago
@hamanfang 我想问问 我在使用这个脚本的时候 说没有node name 是 cls/prediction/... 看起来您没有这个问题,请问您检查过graph.pbtxt 了吗 里面有这个叫 cls/predictions/...的node 吗
@652994331 cls/predictions 這個node似乎在原本pre-trained model裡的ckpt才找的到,使用run_classification train完的ckpt是沒有的,而小弟後來是改用saved_model的方式輸出模型,使用上比較簡單
您好
小弟在colab上使用TPU fine-tune完 model 之後,想要部署到device上,使用了 README.md 中的方式先轉換成pb格式
!freeze_graph --input_checkpoint=./model.ckpt-39999 \ --output_graph=./albert_tiny_zh.pb \ --output_node_names=cls/predictions/truediv \ --checkpoint_version=1 --input_meta_graph=./model.ckpt-39999.meta --input_binary=true
但遇到了下列問題
No OpKernel was registered to support Op 'InfeedEnqueueTuple' used by node input_pipeline_task0/while/InfeedQueue/enqueue/0 (defined at /lib/python2.7/dist-packages/tensorflow_core/python/framework/ops.py:1748) with these attrs: [_class=["loc:@input_pipeline_task0/while/IteratorGetNext"], shapes=[[8,128], [8,128], [8], [8], [8,128]], device_ordinal=0, layouts=[], dtypes=[DT_INT32, DT_INT32, DT_INT32, DT_INT32, DT_INT32]] Registered devices: [CPU, XLA_CPU] Registered kernels: