AttributeError: 'GPT2LMHeadModel' object has no attribute 'h'
# ❓ Questions & Help

when I run run_generation.py（I use TF1.14 fine tuned gpt2）,the program is broken with the error message AttributeError: 'GPT2LMHeadModel' object has no attribute 'h'

Environment:
WIN10
pytorch 1.3.1
python 3.6

Part of the code has been modified
![image](https://user-images.githubusercontent.com/15426714/87869491-e6294180-c9d2-11ea-8b45-be83742b1045.png)

You can't load directly a TF checkpoint if it's not been generated by the TensorFlow side of the library (which can't be the case here since you're using a TF1 checkpoint and the lib requires TF2.0). You probably have to use the [conversion script](https://huggingface.co/transformers/converting_tensorflow_models.html).<|||||>This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
