0

While trying to finetune gpt-2, I always get the Error "ValueError" and can´t seem to find the cause of this Error.

I am using Max Wool´s Google Colab to finetune gpt-2.

I followed all instructions in the Notebook and tried to start this cell:

sess = gpt2.start_tf_sess()  
 
gpt2.finetune(sess,  
              dataset= file_name,  
              model_name='124M',  
              steps=1000,  
              restore_from='fresh',  
              run_name='run1',  
              print_every=10,  
              sample_every=100,  
              save_every=500  
)

But I always get this error:

ValueError                                Traceback (most recent call last)
<ipython-input-37-76f19599c0d2> in <module>
      9               print_every=10,
     10               sample_every=200,
---> 11               save_every=500
     12               )
/usr/local/lib/python3.7/dist-packages/tensorflow/python/ops/variable_scope.py in _get_single_variable(self, name, shape, dtype, initializer, regularizer, partition_info, reuse, trainable, collections, caching_device, validate_shape, use_resource, constraint, synchronization, aggregation)
    889         # ResourceVariables don't have an op associated with so no traceback
    890         if isinstance(var, resource_variable_ops.ResourceVariable):
--> 891           raise ValueError(err_msg)
    892         tb = var.op.traceback[::-1]
    893         # Throw away internal tf entries and only take a few lines. In some

I can´t seem to find any solutions to my problem, can anybody help?

Z Li
  • 4,133
  • 1
  • 4
  • 19
Aliniu
  • 1

0 Answers0