-
Notifications
You must be signed in to change notification settings - Fork 212
Semantic Segmentation task documentation for from_datasets
#938
Comments
Hi @klwetstone thanks for reporting this! I think this is also bug as I was expecting both of the variations you have there to work 😃 |
@ethanwharris glad it's helpful! Happy to send more of the details I found from poking around in the debugger too 👍 |
Definitely helpful as I think this invalidates our docs / recommendations for every task! AFAICT the error is here: https://github.com/PyTorchLightning/lightning-flash/blob/d1be93cd2d5b59af8bc40db2e6a606688b9d071c/flash/core/data/data_source.py#L371 |
@ethanwharris sure! I agree - I think that's where the error is. When I was in debugging mode I basically got: DefaultDataKeys.INPUT: {"input": # input image tensor,
"target": # target image tensor
} So if
|
Yeah, I think a special case for when |
Ah I see. That sounds like a good fix, thanks! If you want a tester once it's implemented let me know, happy to try it out |
@klwetstone Would you like to try the fix? Should be possible to just update the |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Currently, the docs for Semantic Segmentation tasks say that to use the
from_datasets
method:When the
__getitem__
method is defined this way, items are not correctly interpreted and the full dictionary is treated as the input. It actually has to be a tuple of the input tensor and the target tensor.Issue using current docs instructions
The code below is a simplified version of what was run:
Create dataset class
Run model
Correct usage
The modeling code above works correctly when
__getitem__
returns a tuple of the input image and the target image, each as a tensor:Suggested docs fix
In the
from_datasets
section of the docs, change:To:
The text was updated successfully, but these errors were encountered: