Comments (2)
Hi, thank you for your great work!
I encountered the following error in predictor.py` when trying to test BertAbs model.
python train.py -task abs -mode test -test_from ../models/abs/model_step_8000.pt -batch_size 3000 -test_batch_size 500 -bert_data_path ../bert_data/bert.pt_data -log_file ../logs/test_abs -model_path ../models/abs -sep_optim true -use_interval true -visible_gpus 0 -max_pos 512 -max_length 200 -alpha 0.95 -min_length 50 -result_path ../logs/abs
Traceback (most recent call last):
File "train.py", line 135, in
test_abs(args, device_id, cp, step)
File "/home/t-kasanishi/PreSumm/src/train_abstractive.py", line 225, in test_abs
predictor.translate(test_iter, step)
File "/home/t-kasanishi/PreSumm/src/models/predictor.py", line 149, in translate
batch_data = self.translate_batch(batch)
File "/home/t-kasanishi/PreSumm/src/models/predictor.py", line 218, in translate_batch
min_length=self.min_length)
File "/home/t-kasanishi/PreSumm/src/models/predictor.py", line 333, in _fast_translate_batch
[alive_seq.index_select(0, select_indices),
RuntimeError: "index_select_out_cuda_impl" not implemented for 'Float'Below is a shape and contents of
select_indices
andalive_seq
. FloatTensor cannot be used for the argument of.index_select()
(only IntTensor or LongTensor is suitable). How should I fix it? Thank you!select_indices.shape: torch.Size([30])
select_indices: tensor([ 0.0654, 0.0655, 0.0657, 0.0340, 0.0674, 5.0654, 5.0655, 5.0657,
5.0340, 5.0674, 10.0654, 10.0657, 10.0655, 10.0340, 10.0657, 15.0654,
15.0655, 15.0657, 15.0340, 15.0674, 20.0654, 20.0655, 20.0657, 20.0340,
20.0657, 25.0654, 25.0655, 25.0657, 25.0340, 25.0674], device='cuda:0')
alive_seq.shape: torch.Size([30, 1])
alive_seq: tensor([[1],
[1],
[1],
[1],
[1],
[1],
[1],
[1],
[1],
[1],
[1],
[1],
[1],
[1],
[1],
[1],
[1],
[1],
[1],
[1],
[1],
[1],
[1],
[1],
[1],
[1],
[1],
[1],
[1],
[1]], device='cuda:0')
topk_beam_index = topk_ids.div(vocab_size)
topk_beam_index = topk_ids // vocab_size
from presumm.
请问解决了吗?我也遇到了这个问题
from presumm.
Related Issues (20)
- having [Errno 21] Is a directory: while running train for BertExtAbs
- step 4 converting to simpler json returning asci error
- TypeError: __init__() got an unexpected keyword argument 'temp_dir'
- example_add_guidance.py
- Acc is very low and does not converge during training
- Cannot load model via torch.load HOT 1
- xsum数据集 HOT 1
- data preprocessing: empty 'tgt' text HOT 1
- issue for converting to bert_data HOT 2
- Use pretrained model : train_from HOT 9
- Getting the same sequence for all input candidate in generation
- How to do inference using pretrained bertsum models?
- Training the BERT large extractive model
- How can i know if i download BERT successfully
- bert-base-uncased HOT 2
- error in step 3 HOT 1
- 在运行test模式,BertAbs模型时,遇到了RuntimeError: "index_select_out_cuda_impl" not implemented for 'Float' HOT 1
- How to save the best model? HOT 1
- RuntimeError: cublas runtime error : the GPU program failed to execute at /pytorch/aten/src/THC/THCBlas.cu:450
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 presumm.