torch / DEPRECEATED-torch7-distro

Torch7: state-of-the-art machine learning algorithms

Home Page:www.torch.ch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Segmentation Fault in tensor:sub()

fidlej opened this issue · comments

The following code causes a segmentation fault:

torch.Tensor():sub(1, 0)
torch.Tensor():sub(0, 1)

The problem happens when the tensor is empty
and the used index is zero.
Should I add a better checking of the arguments?