minimaxir / gpt-2-simple

Python package to easily retrain OpenAI's GPT-2 text-generating model on new texts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Local using model trained in google colab

lolomap opened this issue · comments

I trained model with google colab and saved it on google drive. Then I downloaded model and tried to use it on my PC (I try to use it in Django for my web app)
Model can be loaded but crashes on gpt2.generate:

ValueError: Fetch argument <tf.Tensor 'strided_slice:0' shape=(1, ?) dtype=int32> cannot be interpreted as a Tensor. (Tensor Tensor("strided_slice:0", shape=(1, ?), dtype=int32) is not an element of this graph.)

How can I fix it?