question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Output of RandomGhosting is not float32

See original GitHub issue

As I am still trying to wrap my head around the SubjectsDataset class I find myself confused at this error I’ve been getting when I try to do training with a defined batch_size on the Dataloader (using torch.utils.data.Dataloader):

RuntimeError: Expected object of scalar type Float but got scalar type Double for sequence element 1 in sequence argument at position #1 'tensors'

If I don’t set a batch_size this error disappears. I found the exact same issue in PyTorch forums and the solution involves making a transformation ToTensor that explicitly defines the data type to be loaded. https://discuss.pytorch.org/t/runtimeerror-expected-object-of-scalar-type-double-but-got-scalar-type-long-for-sequence-element-1-in-sequence-argument-at-position-1-tensors/46952

I thought I could do this using the Lambda transformation; however, it’s not clear to me how as the images are ScalarImage type. for example this is not possible: subject['gt'].tensor = subject['gt'].tensor.type(torch.DoubleTensor)

Thoughts?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
fepegarcommented, Dec 2, 2020

Fixed in v0.18.1. Thanks for reporting!

1reaction
Linardoscommented, Dec 2, 2020

Yeah I guess it wasn’t that minimal, sorry hahah. But since we found the issue it’s fine. Thanks for your quick replies.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ghosting image on left lens of Quest 2 - Oculus Forum
I tried everything to figure out if was my sight, the lens or whatever, but no, is a software issue that handle the...
Read more >
Being ghosted? This message is for you. : r/dating_advice
Dating is not a game there's no rules to it (even though people wanna make you believe there are some rules) but still...
Read more >
Orbiting Is the New Ghosting and It's Probably Happening to You
By know we're all familiar with the dating phenomenon of "ghosting." But there's a new version of ghosting out there, orbiting.
Read more >
Augmentation - TorchIO - Read the Docs
Augmentation transforms generate different results every time they are called. ... Apply a random affine transformation and resample the image. Parameters:.
Read more >
What Does Ghosting Mean? | The Word Counter
This means blocking someone's phone number, blocking them on social media, avoiding them, and probably having their friends and social circles ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found