Comments (3)
Facing the same error
from gpt-2-tensorflow2.0.
I'm having the same issue.
Just like @Carterbouley, I ran the preprocessing and the training and everything went fine.
But when I start the sample sequence I get this error (after 30 seconds or so):
run sequence_generator.py
Model weights loaded into memory
Traceback (most recent call last):
File "G:\Repos\gpt-2-tensorflow2.0\sequence_generator.py", line 28, in <module>
seq_gen()
File "G:\Python\Anaconda3\lib\site-packages\click\core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "G:\Python\Anaconda3\lib\site-packages\click\core.py", line 1053, in main
rv = self.invoke(ctx)
File "G:\Python\Anaconda3\lib\site-packages\click\core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "G:\Python\Anaconda3\lib\site-packages\click\core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "G:\Repos\gpt-2-tensorflow2.0\sequence_generator.py", line 18, in seq_gen
generated_seq = sg.sample_sequence(context,
File "G:\Repos\gpt-2-tensorflow2.0\sample.py", line 117, in sample_sequence
generated_seq = self.sp.decode_ids(pred[1:])
File "G:\Python\Anaconda3\lib\site-packages\sentencepiece\__init__.py", line 174, in DecodeIdsWithCheck
return _sentencepiece.SentencePieceProcessor_DecodeIdsWithCheck(self, ids)
IndexError: Out of range: piece id is out of range.
As you can see from the traceback, I'm running the script in an Anaconda environment (Anaconda Navigator 2.1.1) using Spyder 5.1.5.
Python version 3.8.12.
Tensorflow version 2.7 (currently running on CPU because of insufficient amount of VRAM (11GB) on GPU).
Sentencepiece version 0..1.96
Windows 11
from gpt-2-tensorflow2.0.
Just like @tkahn . After training and evaluating an epoch when generating/scoring the predictions it throws the exception:
[/usr/local/lib/python3.7/dist-packages/sentencepiece/__init__.py](https://localhost:8080/#) in _func(v, n)
1036 def _func(v, n):
1037 if type(n) is int and (n < 0 or n >= v.piece_size()):
-> 1038 raise IndexError('piece id is out of range.')
1039 return func(v, n)
1040
IndexError: piece id is out of range.
Anybody could figure it out?
from gpt-2-tensorflow2.0.
Related Issues (20)
- Why was WSWS.org taken out of the gpt-2 dataset, but Breitbart, fox etc was left in?
- sg.sample_sequence returns context after pre-trained model HOT 3
- The Following Error is Generated HOT 1
- No module named sentencepiece
- why not epoch ? how to stop train model
- Error while training HOT 1
- How can i train a model with language with not english symbols?
- Error in PredictCost() for the op: "Softmax"
- Performance issues in data_pipeline.py(P2)
- What is shared weight across layers?
- python setup.py egg_info did not run successfully.
- Batch inference issue and left padding HOT 3
- problem with training HOT 1
- RuntimeError: Internal: /sentencepiece/src/trainer_interface.cc(336) [!sentences_.empty()] HOT 11
- Mismatch in Arguments HOT 6
- Is Concatenation of Data Files Necessary?
- Why Train_Accuracy is pretty low(about 0.2) ? HOT 1
- can not covert to pytorch model by using transformers
- tensor mask shape may be different with tensor matmul_qk shape
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpt-2-tensorflow2.0.