zhihu / cuBERT

Fast implementation of BERT inference directly on NVIDIA (CUDA, CUBLAS) and Intel MKL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to run it by other trained model

eurekaqq opened this issue · comments

Hello, I would like to try to use my trained model predictions(trained with origin BERT) and convert them from .ckpt to .pb files. But when I call model.tokenize_compute and I got wrong, "The model does not have additional_output_layer, the output logits is wrong.". It seems that I had wrong in my model conversion. Can you tell me how to convert my trained model to pb?

The warning suggest that you do not have

https://github.com/google-research/bert/blob/d66a146741588fb208450bde15aa7db143baaa69/run_classifier.py#L606

in your model.

So, you can change your output_type and output in your python code. Maybe you need cuBERT_POOLED_OUTPUT.

Thank you for your reply, it is working for me.