Comments (6)
make sure the labels` data type is torch.cuda.LongTensor
i saw your log that something wrong in the labels' datatype (torch.cuda.IntTensor)
File "D:/github/torch_light/Image-Cap/train.py", line 235, in
target, _ = actor(hidden, labels)
from torch-light.
@ne7ermore
hi, I don't modify Image-Cap/train.py, i saw return labels is int list.
thx!
from torch-light.
what did you get from the data_loader. Data_loader
try to get the labels` datatype form this line below i show
https://github.com/ne7ermore/torch_light/blob/master/Image-Cap/data_loader.py#L41
or you can try this simple test code: https://github.com/ne7ermore/torch_light/blob/master/Image-Cap/data_loader.py#L58
img, labels = next(training_data) from https://github.com/ne7ermore/torch_light/blob/master/Image-Cap/data_loader.py#L66
print(labels)
from torch-light.
@ne7ermore
Hi, when I run Image-Cap/data_loader.py, labels is [torch.cuda.IntTensor of size 2x16 (GPU 0)], Image-Cap/train.py#115 labels is [torch.cuda.IntTensor of size 32x17 (GPU 0)]
thx!
from torch-light.
I guess sth change between pytorch`s versions
my version is 0.3.1
and i have added long() function to change the datatype of labels
https://github.com/ne7ermore/torch_light/blob/master/Image-Cap/data_loader.py#L46
please try again :)
if found error again, show the pytorch's version which you used
from torch-light.
@ne7ermore
Thank you so much, it works out! train.py has been running!
from torch-light.
Related Issues (20)
- A query regarding Image-Cap HOT 4
- invalid index of a 0-dim tensor
- your deep-srl is NER? HOT 1
- Why only one image while training image captioning ?
- Question regard Deep SRL module
- 报错 HOT 2
- 人机对战时电脑计算的特别慢是因为没训练到位吗?还是电脑太渣 HOT 4
- 请问 alpha zero训练时,出现如下错误 是什么原因啊
- 大佬您好,请问下为什么从150次开始损失一直在2.5左右,降不下来,您当初损失降得很顺利吗
- 数据在哪下载
- How to add CRF layer after biLSTM output layer? HOT 2
- Model not found HOT 1
- what's the meaning of computing the new_lr with emb_dim? HOT 1
- An error when I run the train.py of LSTM-CNNs-CRF HOT 4
- You may add 'python3 corpus.py' before 'python3 train.py' HOT 1
- Problems while running facial-beauty-prediction HOT 1
- AttributeError: 'NoneType' object has no attribute 'data' HOT 1
- Image-Cap: Assertion Error HOT 3
- Confused by this conv1d operation HOT 1
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 torch-light.