Docker image is not working, torch.nn.modules.module.ModuleAttributeError: 'Hardswish' object has no attribute 'inplace'Â #1327
Description
Activity
Hello @thomasgauvin, thank you for your interest in our work! Please visit our Custom Training Tutorial to get started, and see our Jupyter Notebook , Docker Image, and Google Cloud Quickstart Guide for example environments.
If this is a bug report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.
If this is a custom model or data training question, please note Ultralytics does not provide free personal support. As a leader in vision ML and AI, we do offer professional consulting, from simple expert advice up to delivery of fully customized, end-to-end production solutions for our clients, such as:
- Cloud-based AI systems operating on hundreds of HD video streams in realtime.
- Edge AI integrated into custom iOS and Android apps for realtime 30 FPS video inference.
- Custom data training, hyperparameter evolution, and model exportation to any destination.
For more information please visit https://www.ultralytics.com.
Thank you for the response @glenn-jocher, I will try it again perhaps there is something wrong with my configurations
hello @thomasgauvin
I also have the same problem when I run the detect.py
The error is "torch.nn.modules.module.ModuleAttributeError: 'Hardswish' object has no attribute 'inplace'"
Have you solved this problem? If you solved this problem,what's your configurations?
thank you!
@HsLOL Using torch-1.6.0 with torchvision-0.7.0 could slove this problem
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.


Before submitting a bug report, please be aware that your issue must be reproducible with all of the following, otherwise it is non-actionable, and we can not help you:
git fetch && git status -unoto check andgit pullto update repoIf this is a custom dataset/training question you must include your
train*.jpg,test*.jpgandresults.pngfigures, or we can not help you. You can generate these withutils.plot_results().ð Bug
A clear and concise description of what the bug is.
Attempting to run the ultralytics/yolov5:latest docker image results in torch.nn.modules.module.ModuleAttributeError: 'Hardswish' object has no attribute 'inplace'
To Reproduce (REQUIRED)
run
python detect.py ...Output:
Expected behavior
It should run and begin analyzing the video frames
Environment
If applicable, add screenshots to help explain your problem.