Skip to content

bug for CudaLongTensor conversion #13

@congling

Description

@congling

Hi,
I've tried your sample. But I found that the code has some issues for tensor conversion
When it runs to these two lines, th will report 'invalid arguments CudaLongTensor CudaTensor'
lloss = lloss + YYb:eq(Yb):sum()
lloss = lloss + YYb:eq(Yb):sum(2):eq(5):sum()
I changed it into the following to make it work
lloss = lloss + YYb:long():eq(Yb:long()):sum()
lloss = lloss + YYb:long():eq(Yb:long()):sum(2):eq(5):sum()

Btw, the training for 10K samples are very slow in my GTX 1080. Do I need to set something else?
Thanks

train .. 0.011111111111111
loss..250.91162276268
valid .. 3.38
train .. 6.5777777777778
valid .. 0
train .. 0.044444444444444
loss..248.19494605064
valid .. 3.98
train .. 8.1777777777778
valid .. 0
train .. 0.21111111111111

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions