Skip to content

Cannot do a second net.forward() with Input layer #4255

@kevin-li

Description

@kevin-li

I have a forloop in which I load different data into the Inputlayer and runs forward. It crashes my Nvidia driver. I found that this net can only do a forward once, and on the second net.forward() it crashes, giving error == cudaSuccess (4 vs. 0)unspecified launch failure. But if I load the net again in the forloop, it works fine.

I did not have this problem before, not sure why this shows up now. I tried different versions of Nvidia driver and it's the same.

for i in fvs:
    batch_image = batch_images[i]
    net.blobs['data'].reshape(*batch_image.shape)
    net.blobs['data'].data[...] = batch_image-115
    output = net.forward() # crashes on the second iteration
    probs = output['prob'][:,1]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions