cvpr2015 icon indicating copy to clipboard operation
cvpr2015 copied to clipboard

The tutorial Deep Learning with Torch has maybe issues

Open mcenderdragon opened this issue 8 years ago • 0 comments

while trying something from the tutorial I noticed when defining the training data the code is:


-- ignore setmetatable for now, it is a feature beyond the scope of this tutorial. It sets the index operator.
setmetatable(trainset, 
    {__index = function(t, i) 
             return {t.data[i], t.label[i]} 
                end}
);
trainset.data = trainset.data:double() -- convert the data from a ByteTensor to a DoubleTensor.

function trainset:size() 
    return self.data:size(1) 
end

but that crashes with an stackoverflow error if you try to acces size()

mcenderdragon avatar May 27 '17 17:05 mcenderdragon