-
Notifications
You must be signed in to change notification settings - Fork 606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: 'DataNode' object does not support item assignment #5467
Comments
Hi @jackdaw213, Thank you for reaching out. A couple of observations from our side:
|
Hello @JanuszL, thank you for the answers
The operation is to create
Ah that's unfortunate, thank you for the info
I don't know if cat can replace the item assignments in this situation or maybe I do not understand the example correctly. |
Hello @jackdaw213, |
Hello @mzient, thank you for your response
That's a good idea but sometimes the loop would get quite lengthy so that's not suitable for this situation
This will create the same mask with the same square size/location for all images in the batch right ? But I want a different mask for each image in the batch, is it possible ? |
How long could it get?
No; the batch in DALI is implicit. When you do: slice = [
img[i][t[i]:b[i], l[i]:r[i]] for i in range(batch_size)
] |
Oops, I somehow think that your idea was to check for every possible value of
Ah, that cleared up some of my misunderstandings. However, I still do not understand your intention of generating a mask for each image. Now I know that |
Hello @mzient, I trying to make the loop work, but there is a bug that I can't seem to fix:
|
Hi @jackdaw213,
|
Hello @JanuszL, modified my code a bit and added fn.stack to my code but there are some issues
|
@jackdaw213 I'm quite sure there are some constructs that work in "regular" mode but not in "debug". Can you try to run your code without debugging? |
@mzient I turn off debug mode and those 2 issues seem to be gone, however, a new issue pops up. |
Any ideas @mzient ? I did some more research, but I couldn't find any method to transfer data from the GPU to the CPU. |
@jackdaw213 Thank you for checking non-debug pipeline. Currently there's no way to go from GPU to CPU within a single pipeline. We're actively working on relaxing the execution model to allow arbitrary transfers, however, a usable version is still a release or two away. |
Hello @mzient, it's great to hear that GPU2CPU transfer is coming in the future. However, I'm unsure how to approach my problem in the meantime. The only solutions I can think of are to either make the DALI pipeline run on the CPU or find a way to make |
Describe the question.
My dali pipeline is the above and I have 2 questions:
mask
for each image? Is there any efficient way of doing it outside of loop ?Mask
is a DataNode and does not support item assignment. How can I resolve this issue ? I tried to create amask
as a Pytorch tensor and usedtorch.mean()
butcolor
is a DataNode which does not work with PyTorchCheck for duplicates
The text was updated successfully, but these errors were encountered: