torch / image

An Image toolbox for Torch.
Other
208 stars 141 forks source link

rgb2yuv - bad argument #2 to '?' #147

Closed balzer82 closed 8 years ago

balzer82 commented 8 years ago

I am tryin to to through the tutorial. What did I wrong?

bildschirmfoto vom 2016-02-25 11 17 10

balzer82 commented 8 years ago

Solved: Had to index a col.

trainData.data[1] is in shape of

(1,.,.) = 
 Columns 1 to 15
    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0

so this works:

for i = 1,trainData:size() do
   trainData.data[i] = image.rgb2yuv(trainData.data[i][1])
end

Is it my fault or is the tutorial out of date or is the dataset different?

balzer82 commented 8 years ago

My fault: I downloaded this dataset mentioned here (in the end), which is in different format, so the tutorial in the .lua file won't work