Skip to content

fix: label tensors used directly in % string formatting crash - #100

Open
andrewwhitecdw wants to merge 1 commit into
NVlabs:masterfrom
andrewwhitecdw:bugfix/test-folder-51000ab4
Open

fix: label tensors used directly in % string formatting crash#100
andrewwhitecdw wants to merge 1 commit into
NVlabs:masterfrom
andrewwhitecdw:bugfix/test-folder-51000ab4

Conversation

@andrewwhitecdw

@andrewwhitecdw andrewwhitecdw commented Jul 27, 2026

Copy link
Copy Markdown

Problem

fix: label tensors used directly in % string formatting crash

Fix

Replace:

            id_img, label = data
            id_img_flip = Variable(fliplr(id_img).cuda())
            id_img = Variable(id_img.cuda())
            bg_img, label2 = data2

with:

            id_img, label = data
            label = label.item()
            id_img_flip = Variable(fliplr(id_img).cuda())
            id_img = Variable(id_img.cuda())
            bg_img, label2 = data2
            label2 = label2.item()

Files changed

  • visual_tools/test_folder.py

@andrewwhitecdw
andrewwhitecdw marked this pull request as ready for review August 3, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant