Skip to content
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

List of Warnings #1

Open
Lars-Kraemer opened this issue Feb 28, 2024 · 0 comments
Open

List of Warnings #1

Lars-Kraemer opened this issue Feb 28, 2024 · 0 comments
Assignees

Comments

@Lars-Kraemer
Copy link
Member

Hey @Karol-G,

I have a list of warnings that occur when using patchly.

/home/l727r/anaconda3/envs/sem_seg/lib/python3.10/site-packages/patchly/array_like.py:23: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
data = torch.tensor(data)

These two are probably caused when patch_size==img_size

/home/l727r/anaconda3/envs/sem_seg/lib/python3.10/site-packages/patchly/sampler.py:392: RuntimeWarning: divide by zero encountered in scalar floor_divide
additional_offset_s = [axis_squeeze_s[axis] // (len(axis_positions_s[axis]) - 1) for axis in range(n_axis_s)]

/home/l727r/anaconda3/envs/sem_seg/lib/python3.10/site-packages/patchly/sampler.py:393: RuntimeWarning: divide by zero encountered in scalar remainder
remainder_offset_s = [axis_squeeze_s[axis] % (len(axis_positions_s[axis]) - 1) for axis in range(n_axis_s)]

Best,
Lars

@Karol-G Karol-G self-assigned this May 7, 2024
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

No branches or pull requests

2 participants