[go: nahoru, domu]

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

AttributeError: module 'segmentation_models_pytorch' has no attribute 'utils' #786

Closed
kapedalex opened this issue Jun 25, 2023 · 1 comment

Comments

@kapedalex
Copy link
kapedalex commented Jun 25, 2023

Tried this block from https://github.com/qubvel/segmentation_models.pytorch/blob/master/examples/cars%20segmentation%20(camvid).ipynb:

loss = smp.utils.losses.DiceLoss()
metrics = [
smp.utils.metrics.IoU(threshold=0.5),
]

optimizer = torch.optim.Adam([
dict(params=model.parameters(), lr=0.0001),
])

Returns AttributeError: module 'segmentation_models_pytorch' has no attribute 'utils'

@kapedalex
Copy link
Author

You can fix this with
from segmentation_models_pytorch import utils

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

1 participant