torch / qtlua

Lua interface to QT library
Other
206 stars 73 forks source link

fixed qtwidget.newimage to actually accept tensors. #6

Closed jonathantompson closed 10 years ago

jonathantompson commented 10 years ago

The following fails in the current master..

require 'qt'
require 'qttorch'
require 'qtwidget'
require 'qtuiloader'
qim = qtwidget.newimage(image.lena())

Because torch.typename(image.lena()) does not equal 'torch.Tensor', but whatever the default tensor type is (ie 'torch.DoubleTensor'). This is fixed now.

soumith commented 10 years ago

Thanks!