Anurag1734/cuda-error-resolution-analysis
07
1[2 {3 "post_stream": {4 "posts": [5 {6 "id": 380354,7 "name": "",8 "username": "Ambrozy",9 "avatar_template": "/letter_avatar_proxy/v4/letter/a/8dc957/{size}.png",10 "created_at": "2022-12-25T17:12:21.340Z",11 "cooked": "<p>Is there a way to run scripted half precision model in pytorch mobile? If not, will this be supported in the future? and is there way to at least convert saved fp16 scripted model to fp32 on mobile device inside pytorch mobile?</p>",12 "post_number": 1,13 "post_type": 1,14 "posts_count": 6,15 "updated_at": "2022-12-25T17:12:21.340Z",16 "reply_count": 0,17 "reply_to_post_number": null,18 "quote_count": 0,19 "incoming_link_count": 391,20 "reads": 13,21 "readers_count": 12,22 "score": 1957.6,23 "yours": false,24 "topic_id": 168990,25 "topic_slug": "fp16-support-in-pytorch-mobile",26 "display_username": "",27 "primary_group_name": null,28 "flair_name": null,29 "flair_url": null,30 "flair_bg_color": null,31 "flair_color": null,32 "flair_group_id": null,33 "badges_granted": [],34 "version": 1,35 "can_edit": false,36 "can_delete": false,37 "can_recover": false,38 "can_see_hidden_post": false,39 "can_wiki": false,40 "read": true,41 "user_title": "",42 "bookmarked": false,43 "actions_summary": [],44 "moderator": false,45 "admin": false,46 "staff": false,47 "user_id": 53192,48 "hidden": false,49 "trust_level": 1,50 "deleted_at": null,51 "user_deleted": false,52 "edit_reason": null,53 "can_view_edit_history": true,54 "wiki": false,55 "post_url": "/t/fp16-support-in-pytorch-mobile/168990/1",56 "can_accept_answer": false,57 "can_unaccept_answer": false,58 "accepted_answer": false,59 "topic_accepted_answer": null,60 "can_vote": false61 },62 {63 "id": 380372,64 "name": "",65 "username": "ptrblck",66 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",67 "created_at": "2022-12-25T20:13:24.598Z",68 "cooked": "<p>I’m not sure if the mobile device architecture would benefit from <code>float16</code> dtypes (the x86 CPU architectures do not see a benefit from it which is also the reason <code>float16</code> ops are mostly not supported on the CPU in PyTorch).</p>\n<p>I don’t know about future plans and if some devices are planning to support <code>float16</code> on mobile.</p>\n<p>I would assume transformations are still possible on mobile, i.e. would <code>model.to(dtype)</code> work?</p>",69 "post_number": 2,70 "post_type": 1,71 "posts_count": 6,72 "updated_at": "2022-12-25T20:13:24.598Z",73 "reply_count": 2,74 "reply_to_post_number": null,75 "quote_count": 0,76 "incoming_link_count": 3,77 "reads": 13,78 "readers_count": 12,79 "score": 27.6,80 "yours": false,81 "topic_id": 168990,82 "topic_slug": "fp16-support-in-pytorch-mobile",83 "display_username": "",84 "primary_group_name": null,85 "flair_name": null,86 "flair_url": null,87 "flair_bg_color": null,88 "flair_color": null,89 "flair_group_id": null,90 "badges_granted": [],91 "version": 1,92 "can_edit": false,93 "can_delete": false,94 "can_recover": false,95 "can_see_hidden_post": false,96 "can_wiki": false,97 "read": true,98 "user_title": "",99 "bookmarked": false,100 "actions_summary": [],101 "moderator": true,102 "admin": true,103 "staff": true,104 "user_id": 3534,105 "hidden": false,106 "trust_level": 2,107 "deleted_at": null,108 "user_deleted": false,109 "edit_reason": null,110 "can_view_edit_history": true,111 "wiki": false,112 "post_url": "/t/fp16-support-in-pytorch-mobile/168990/2",113 "can_accept_answer": false,114 "can_unaccept_answer": false,115 "accepted_answer": false,116 "topic_accepted_answer": null117 },118 {119 "id": 380958,120 "name": "Kimish Patel",121 "username": "kimishpatel",122 "avatar_template": "/user_avatar/discuss.pytorch.org/kimishpatel/{size}/39320_2.png",123 "created_at": "2022-12-30T18:38:43.468Z",124 "cooked": "<p>While arm cpus have support for fp16, we dont support that on mobile runtime to directly take advantage of fp16 features of mobile cpus.</p>\n<p>In terms of saving fp16 and converting to fp32 on model load is something that is not quite supported natively. I have not explored this but it might be possible to do this entirely in torchscirpt without pytorch runtime needing to support this natively.</p>",125 "post_number": 3,126 "post_type": 1,127 "posts_count": 6,128 "updated_at": "2022-12-30T18:38:43.468Z",129 "reply_count": 0,130 "reply_to_post_number": 2,131 "quote_count": 0,132 "incoming_link_count": 1,133 "reads": 11,134 "readers_count": 10,135 "score": 7.2,136 "yours": false,137 "topic_id": 168990,138 "topic_slug": "fp16-support-in-pytorch-mobile",139 "display_username": "Kimish Patel",140 "primary_group_name": null,141 "flair_name": null,142 "flair_url": null,143 "flair_bg_color": null,144 "flair_color": null,145 "flair_group_id": null,146 "badges_granted": [],147 "version": 1,148 "can_edit": false,149 "can_delete": false,150 "can_recover": false,151 "can_see_hidden_post": false,152 "can_wiki": false,153 "read": true,154 "user_title": null,155 "reply_to_user": {156 "id": 3534,157 "username": "ptrblck",158 "name": "",159 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png"160 },161 "bookmarked": false,162 "actions_summary": [],163 "moderator": false,164 "admin": false,165 "staff": false,166 "user_id": 38201,167 "hidden": false,168 "trust_level": 2,169 "deleted_at": null,170 "user_deleted": false,171 "edit_reason": null,172 "can_view_edit_history": true,173 "wiki": false,174 "post_url": "/t/fp16-support-in-pytorch-mobile/168990/3",175 "can_accept_answer": false,176 "can_unaccept_answer": false,177 "accepted_answer": false,178 "topic_accepted_answer": null179 },180 {181 "id": 380959,182 "name": "Kimish Patel",183 "username": "kimishpatel",184 "avatar_template": "/user_avatar/discuss.pytorch.org/kimishpatel/{size}/39320_2.png",185 "created_at": "2022-12-30T18:40:10.575Z",186 "cooked": "<aside class=\"quote no-group\" data-username=\"ptrblck\" data-post=\"2\" data-topic=\"168990\">\n<div class=\"title\">\n<div class=\"quote-controls\"></div>\n<img loading=\"lazy\" alt=\"\" width=\"24\" height=\"24\" src=\"https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/ptrblck/48/1823_2.png\" class=\"avatar\"> ptrblck:</div>\n<blockquote>\n<p>I would assume transformations are still possible on mobile, i.e. would <code>model.to(dtype)</code> work?</p>\n</blockquote>\n</aside>\n<p>model.to likely wont work since on server with full pytorch runtime gets torch::jit::Module as the type returned by torch::jit::load whereas on mobile we have torch::jit::_load_for_mobile which returns torch::jit::mobile::Module.</p>",187 "post_number": 4,188 "post_type": 1,189 "posts_count": 6,190 "updated_at": "2022-12-30T18:40:10.575Z",191 "reply_count": 0,192 "reply_to_post_number": 2,193 "quote_count": 1,194 "incoming_link_count": 3,195 "reads": 10,196 "readers_count": 9,197 "score": 17.0,198 "yours": false,199 "topic_id": 168990,200 "topic_slug": "fp16-support-in-pytorch-mobile",201 "display_username": "Kimish Patel",202 "primary_group_name": null,203 "flair_name": null,204 "flair_url": null,205 "flair_bg_color": null,206 "flair_color": null,207 "flair_group_id": null,208 "badges_granted": [],209 "version": 1,210 "can_edit": false,211 "can_delete": false,212 "can_recover": false,213 "can_see_hidden_post": false,214 "can_wiki": false,215 "read": true,216 "user_title": null,217 "bookmarked": false,218 "actions_summary": [],219 "moderator": false,220 "admin": false,221 "staff": false,222 "user_id": 38201,223 "hidden": false,224 "trust_level": 2,225 "deleted_at": null,226 "user_deleted": false,227 "edit_reason": null,228 "can_view_edit_history": true,229 "wiki": false,230 "post_url": "/t/fp16-support-in-pytorch-mobile/168990/4",231 "can_accept_answer": false,232 "can_unaccept_answer": false,233 "accepted_answer": false,234 "topic_accepted_answer": null235 },236 {237 "id": 476328,238 "name": "brainchip india",239 "username": "brainchip_india",240 "avatar_template": "/user_avatar/discuss.pytorch.org/brainchip_india/{size}/78397_2.png",241 "created_at": "2025-10-23T09:20:24.443Z",242 "cooked": "<p><a class=\"mention\" href=\"/u/ptrblck\">@ptrblck</a> I’m trying a FP32 and FP16 PyTorch model on Mobile. FP32 works fine, but with FP16 the app crashes.<br>\nDoes Pytorch on mobile have support for FP16 now?</p>",243 "post_number": 5,244 "post_type": 1,245 "posts_count": 6,246 "updated_at": "2025-10-23T09:20:24.443Z",247 "reply_count": 1,248 "reply_to_post_number": null,249 "quote_count": 0,250 "incoming_link_count": 3,251 "reads": 4,252 "readers_count": 3,253 "score": 35.8,254 "yours": false,255 "topic_id": 168990,256 "topic_slug": "fp16-support-in-pytorch-mobile",257 "display_username": "brainchip india",258 "primary_group_name": null,259 "flair_name": null,260 "flair_url": null,261 "flair_bg_color": null,262 "flair_color": null,263 "flair_group_id": null,264 "badges_granted": [],265 "version": 1,266 "can_edit": false,267 "can_delete": false,268 "can_recover": false,269 "can_see_hidden_post": false,270 "can_wiki": false,271 "read": true,272 "user_title": null,273 "bookmarked": false,274 "actions_summary": [275 {276 "id": 2,277 "count": 1278 }279 ],280 "moderator": false,281 "admin": false,282 "staff": false,283 "user_id": 86107,284 "hidden": false,285 "trust_level": 1,286 "deleted_at": null,287 "user_deleted": false,288 "edit_reason": null,289 "can_view_edit_history": true,290 "wiki": false,291 "post_url": "/t/fp16-support-in-pytorch-mobile/168990/5",292 "can_accept_answer": false,293 "can_unaccept_answer": false,294 "accepted_answer": false,295 "topic_accepted_answer": null296 },297 {298 "id": 476363,299 "name": "",300 "username": "ptrblck",301 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",302 "created_at": "2025-10-25T15:25:27.218Z",303 "cooked": "<p>Which backend are you using? Do you see these crashes in ExecuTorch?</p>",304 "post_number": 6,305 "post_type": 1,306 "posts_count": 6,307 "updated_at": "2025-10-25T15:25:27.218Z",308 "reply_count": 0,309 "reply_to_post_number": 5,310 "quote_count": 0,311 "incoming_link_count": 0,312 "reads": 1,313 "readers_count": 0,314 "score": 0.2,315 "yours": false,316 "topic_id": 168990,317 "topic_slug": "fp16-support-in-pytorch-mobile",318 "display_username": "",319 "primary_group_name": null,320 "flair_name": null,321 "flair_url": null,322 "flair_bg_color": null,323 "flair_color": null,324 "flair_group_id": null,325 "badges_granted": [],326 "version": 1,327 "can_edit": false,328 "can_delete": false,329 "can_recover": false,330 "can_see_hidden_post": false,331 "can_wiki": false,332 "read": true,333 "user_title": "",334 "reply_to_user": {335 "id": 86107,336 "username": "brainchip_india",337 "name": "brainchip india",338 "avatar_template": "/user_avatar/discuss.pytorch.org/brainchip_india/{size}/78397_2.png"339 },340 "bookmarked": false,341 "actions_summary": [],342 "moderator": true,343 "admin": true,344 "staff": true,345 "user_id": 3534,346 "hidden": false,347 "trust_level": 2,348 "deleted_at": null,349 "user_deleted": false,350 "edit_reason": null,351 "can_view_edit_history": true,352 "wiki": false,353 "post_url": "/t/fp16-support-in-pytorch-mobile/168990/6",354 "can_accept_answer": false,355 "can_unaccept_answer": false,356 "accepted_answer": false,357 "topic_accepted_answer": null358 }359 ],360 "stream": [361 380354,362 380372,363 380958,364 380959,365 476328,366 476363367 ]368 },369 "timeline_lookup": [370 [371 1,372 1035373 ],374 [375 3,376 1030377 ],378 [379 5,380 2381 ],382 [383 6,384 0385 ]386 ],387 "suggested_topics": [388 {389 "fancy_title": "Pytorch on Android App Open Source Code",390 "id": 212345,391 "title": "Pytorch on Android App Open Source Code",392 "slug": "pytorch-on-android-app-open-source-code",393 "posts_count": 4,394 "reply_count": 2,395 "highest_post_number": 4,396 "image_url": null,397 "created_at": "2024-10-31T05:01:09.173Z",398 "last_posted_at": "2024-11-01T05:45:54.334Z",399 "bumped": true,400 "bumped_at": "2024-11-01T05:45:54.334Z",401 "archetype": "regular",402 "unseen": false,403 "pinned": false,404 "unpinned": null,405 "visible": true,406 "closed": false,407 "archived": false,408 "bookmarked": null,409 "liked": null,410 "tags_descriptions": {},411 "like_count": 0,412 "views": 415,413 "category_id": 18,414 "featured_link": null,415 "has_accepted_answer": false,416 "posters": [417 {418 "extras": null,419 "description": "Original Poster",420 "user": {421 "id": 80605,422 "username": "hasan10242048",423 "name": "Hasan",424 "avatar_template": "/letter_avatar_proxy/v4/letter/h/db5fbb/{size}.png",425 "trust_level": 0426 }427 },428 {429 "extras": "latest",430 "description": "Most Recent Poster",431 "user": {432 "id": 78822,433 "username": "Mert_Oguzhan",434 "name": "Mert Oğuzhan",435 "avatar_template": "/user_avatar/discuss.pytorch.org/mert_oguzhan/{size}/72669_2.png",436 "trust_level": 1437 }438 }439 ]440 },441 {442 "fancy_title": "Xcode got error “Error loading model: Following ops cannot be found: [aten::scaled_dot_product_attention]. Please check if the operator library is included in the build. If built with selected ops, check if these ops are in the list.”",443 "id": 215201,444 "title": "Xcode got error \"Error loading model: Following ops cannot be found: [aten::scaled_dot_product_attention]. Please check if the operator library is included in the build. If built with selected ops, check if these ops are in the list.\"",445 "slug": "xcode-got-error-error-loading-model-following-ops-cannot-be-found-aten-scaled-dot-product-attention-please-check-if-the-operator-library-is-included-in-the-build-if-built-with-selected-ops-check-if-these-ops-are-in-the-list",446 "posts_count": 5,447 "reply_count": 2,448 "highest_post_number": 5,449 "image_url": null,450 "created_at": "2025-01-10T08:48:17.185Z",451 "last_posted_at": "2025-01-13T08:45:48.126Z",452 "bumped": true,453 "bumped_at": "2025-01-13T08:45:48.126Z",454 "archetype": "regular",455 "unseen": false,456 "pinned": false,457 "unpinned": null,458 "visible": true,459 "closed": false,460 "archived": false,461 "bookmarked": null,462 "liked": null,463 "tags_descriptions": {},464 "like_count": 0,465 "views": 55,466 "category_id": 18,467 "featured_link": null,468 "has_accepted_answer": false,469 "posters": [470 {471 "extras": "latest",472 "description": "Original Poster, Most Recent Poster",473 "user": {474 "id": 81987,475 "username": "Danny_Vu",476 "name": "Danny Vu",477 "avatar_template": "/user_avatar/discuss.pytorch.org/danny_vu/{size}/75016_2.png",478 "trust_level": 0479 }480 },481 {482 "extras": null,483 "description": "Frequent Poster",484 "user": {485 "id": 3534,486 "username": "ptrblck",487 "name": "",488 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",489 "admin": true,490 "moderator": true,491 "trust_level": 2492 }493 },494 {495 "extras": null,496 "description": "Frequent Poster",497 "user": {498 "id": 82002,499 "username": "tarun292",500 "name": "Tarun Karuturi",501 "avatar_template": "/user_avatar/discuss.pytorch.org/tarun292/{size}/75031_2.png",502 "trust_level": 0503 }504 }505 ]506 },507 {508 "fancy_title": "Android build: Native libraries not 16 KB page-aligned, Play Store rejecting apps",509 "id": 223243,510 "title": "Android build: Native libraries not 16 KB page-aligned, Play Store rejecting apps",511 "slug": "android-build-native-libraries-not-16-kb-page-aligned-play-store-rejecting-apps",512 "posts_count": 4,513 "reply_count": 2,514 "highest_post_number": 4,515 "image_url": null,516 "created_at": "2025-09-22T06:36:37.147Z",517 "last_posted_at": "2025-10-07T16:29:30.910Z",518 "bumped": true,519 "bumped_at": "2025-10-07T16:29:30.910Z",520 "archetype": "regular",521 "unseen": false,522 "pinned": false,523 "unpinned": null,524 "visible": true,525 "closed": false,526 "archived": false,527 "bookmarked": null,528 "liked": null,529 "tags_descriptions": {},530 "like_count": 1,531 "views": 71,532 "category_id": 18,533 "featured_link": null,534 "has_accepted_answer": false,535 "posters": [536 {537 "extras": null,538 "description": "Original Poster",539 "user": {540 "id": 85936,541 "username": "Prahlad",542 "name": "Prahlad",543 "avatar_template": "/user_avatar/discuss.pytorch.org/prahlad/{size}/76925_2.png",544 "trust_level": 0545 }546 },547 {548 "extras": null,549 "description": "Frequent Poster",550 "user": {551 "id": 58104,552 "username": "cbilgin",553 "name": "Cagatay Bilgin",554 "avatar_template": "/user_avatar/discuss.pytorch.org/cbilgin/{size}/48008_2.png",555 "trust_level": 1556 }557 },558 {559 "extras": "latest",560 "description": "Most Recent Poster",561 "user": {562 "id": 86070,563 "username": "olokobayusuf",564 "name": "Yusuf",565 "avatar_template": "/user_avatar/discuss.pytorch.org/olokobayusuf/{size}/78371_2.png",566 "trust_level": 0567 }568 }569 ]570 },571 {572 "fancy_title": "[Android] Large model 4GB on Android app is crashing",573 "id": 223543,574 "title": "[Android] Large model 4GB on Android app is crashing",575 "slug": "android-large-model-4gb-on-android-app-is-crashing",576 "posts_count": 7,577 "reply_count": 1,578 "highest_post_number": 7,579 "image_url": null,580 "created_at": "2025-10-09T07:28:00.164Z",581 "last_posted_at": "2025-10-20T19:14:43.627Z",582 "bumped": true,583 "bumped_at": "2025-10-20T19:14:43.627Z",584 "archetype": "regular",585 "unseen": false,586 "pinned": false,587 "unpinned": null,588 "visible": true,589 "closed": false,590 "archived": false,591 "bookmarked": null,592 "liked": null,593 "tags_descriptions": {},594 "like_count": 0,595 "views": 46,596 "category_id": 18,597 "featured_link": null,598 "has_accepted_answer": false,599 "posters": [600 {601 "extras": null,602 "description": "Original Poster",603 "user": {604 "id": 86107,605 "username": "brainchip_india",606 "name": "brainchip india",607 "avatar_template": "/user_avatar/discuss.pytorch.org/brainchip_india/{size}/78397_2.png",608 "trust_level": 1609 }610 },611 {612 "extras": null,613 "description": "Frequent Poster",614 "user": {615 "id": 86058,616 "username": "GerryMan",617 "name": null,618 "avatar_template": "/letter_avatar_proxy/v4/letter/g/f6c823/{size}.png",619 "trust_level": 1620 }621 },622 {623 "extras": null,624 "description": "Frequent Poster",625 "user": {626 "id": 86070,627 "username": "olokobayusuf",628 "name": "Yusuf",629 "avatar_template": "/user_avatar/discuss.pytorch.org/olokobayusuf/{size}/78371_2.png",630 "trust_level": 0631 }632 },633 {634 "extras": "latest",635 "description": "Most Recent Poster",636 "user": {637 "id": 58104,638 "username": "cbilgin",639 "name": "Cagatay Bilgin",640 "avatar_template": "/user_avatar/discuss.pytorch.org/cbilgin/{size}/48008_2.png",641 "trust_level": 1642 }643 }644 ]645 },646 {647 "fancy_title": "Convert a tuple to torch tensor",648 "id": 216494,649 "title": "Convert a tuple to torch tensor",650 "slug": "convert-a-tuple-to-torch-tensor",651 "posts_count": 5,652 "reply_count": 3,653 "highest_post_number": 6,654 "image_url": null,655 "created_at": "2025-02-10T22:14:04.896Z",656 "last_posted_at": "2025-02-10T23:01:30.034Z",657 "bumped": true,658 "bumped_at": "2025-02-10T23:01:30.034Z",659 "archetype": "regular",660 "unseen": false,661 "pinned": false,662 "unpinned": null,663 "visible": true,664 "closed": false,665 "archived": false,666 "bookmarked": null,667 "liked": null,668 "tags_descriptions": {},669 "like_count": 0,670 "views": 129,671 "category_id": 1,672 "featured_link": null,673 "has_accepted_answer": false,674 "posters": [675 {676 "extras": "latest",677 "description": "Original Poster, Most Recent Poster",678 "user": {679 "id": 44636,680 "username": "Oussama_Bouldjedri",681 "name": "Oussama skikdi",682 "avatar_template": "/user_avatar/discuss.pytorch.org/oussama_bouldjedri/{size}/64172_2.png",683 "trust_level": 1684 }685 },686 {687 "extras": null,688 "description": "Frequent Poster",689 "user": {690 "id": 3534,691 "username": "ptrblck",692 "name": "",693 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",694 "admin": true,695 "moderator": true,696 "trust_level": 2697 }698 }699 ]700 }701 ],702 "tags_descriptions": {},703 "fancy_title": "FP16 support in pytorch mobile",704 "id": 168990,705 "title": "FP16 support in pytorch mobile",706 "posts_count": 6,707 "created_at": "2022-12-25T17:12:21.253Z",708 "views": 1217,709 "reply_count": 3,710 "like_count": 1,711 "last_posted_at": "2025-10-25T15:25:27.218Z",712 "visible": true,713 "closed": false,714 "archived": false,715 "has_summary": false,716 "archetype": "regular",717 "slug": "fp16-support-in-pytorch-mobile",718 "category_id": 18,719 "word_count": 288,720 "deleted_at": null,721 "user_id": 53192,722 "featured_link": null,723 "pinned_globally": false,724 "pinned_at": null,725 "pinned_until": null,726 "image_url": null,727 "slow_mode_seconds": 0,728 "draft": null,729 "draft_key": "topic_168990",730 "draft_sequence": null,731 "unpinned": null,732 "pinned": false,733 "current_post_number": 1,734 "highest_post_number": 6,735 "deleted_by": null,736 "actions_summary": [737 {738 "id": 4,739 "count": 0,740 "hidden": false,741 "can_act": false742 },743 {744 "id": 8,745 "count": 0,746 "hidden": false,747 "can_act": false748 },749 {750 "id": 10,751 "count": 0,752 "hidden": false,753 "can_act": false754 },755 {756 "id": 7,757 "count": 0,758 "hidden": false,759 "can_act": false760 }761 ],762 "chunk_size": 20,763 "bookmarked": false,764 "topic_timer": null,765 "message_bus_last_id": 7,766 "participant_count": 4,767 "show_read_indicator": false,768 "thumbnails": null,769 "slow_mode_enabled_until": null,770 "can_vote": false,771 "vote_count": 0,772 "user_voted": false,773 "discourse_zendesk_plugin_zendesk_id": null,774 "discourse_zendesk_plugin_zendesk_url": "https://your-url.zendesk.com/agent/tickets/",775 "details": {776 "can_edit": false,777 "notification_level": 1,778 "participants": [779 {780 "id": 3534,781 "username": "ptrblck",782 "name": "",783 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",784 "post_count": 2,785 "primary_group_name": null,786 "flair_name": null,787 "flair_url": null,788 "flair_color": null,789 "flair_bg_color": null,790 "flair_group_id": null,791 "admin": true,792 "moderator": true,793 "trust_level": 2794 },795 {796 "id": 38201,797 "username": "kimishpatel",798 "name": "Kimish Patel",799 "avatar_template": "/user_avatar/discuss.pytorch.org/kimishpatel/{size}/39320_2.png",800 "post_count": 2,801 "primary_group_name": null,802 "flair_name": null,803 "flair_url": null,804 "flair_color": null,805 "flair_bg_color": null,806 "flair_group_id": null,807 "trust_level": 2808 },809 {810 "id": 53192,811 "username": "Ambrozy",812 "name": "",813 "avatar_template": "/letter_avatar_proxy/v4/letter/a/8dc957/{size}.png",814 "post_count": 1,815 "primary_group_name": null,816 "flair_name": null,817 "flair_url": null,818 "flair_color": null,819 "flair_bg_color": null,820 "flair_group_id": null,821 "trust_level": 1822 },823 {824 "id": 86107,825 "username": "brainchip_india",826 "name": "brainchip india",827 "avatar_template": "/user_avatar/discuss.pytorch.org/brainchip_india/{size}/78397_2.png",828 "post_count": 1,829 "primary_group_name": null,830 "flair_name": null,831 "flair_url": null,832 "flair_color": null,833 "flair_bg_color": null,834 "flair_group_id": null,835 "trust_level": 1836 }837 ],838 "created_by": {839 "id": 53192,840 "username": "Ambrozy",841 "name": "",842 "avatar_template": "/letter_avatar_proxy/v4/letter/a/8dc957/{size}.png"843 },844 "last_poster": {845 "id": 3534,846 "username": "ptrblck",847 "name": "",848 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png"849 }850 },851 "bookmarks": []852 },853 {854 "post_stream": {855 "posts": [856 {857 "id": 476052,858 "name": "",859 "username": "Alberto500",860 "avatar_template": "/letter_avatar_proxy/v4/letter/a/e9bcb4/{size}.png",861 "created_at": "2025-10-08T11:07:31.904Z",862 "cooked": "<p>Random results in object detection when using a custom trained model(yolov8s as well yolo11s)</p>\n<p>YAML data file:</p>\n<pre data-code-wrap=\"ini\"><code class=\"lang-ini\">path: (…folder path)\ntest: test\\imagestrain:\ntrain\\images\nval: validation\\imagesnc: 1\nnames: [“Apple”]\n</code></pre>\n<p>All folders(test, train, validate) contain “images” and “labels” folders, all images all unique(no repeating images in any of the folders).<br>\nI run the training with this command “yolo detect train data=data.yaml model=yolov8s.pt epochs=90 imgsz=640 profile = True”.</p>\n<p>Once the training is done, i copy the file “best.pt” from Data->runs->detect->train->weights, then i convert it with a script to .onnx since i am using it in OpenCV.<br>\nI am converting as well the trained models, so the conversion to .onnx isn’t the issue.</p>\n<p>Correct results rectangle output: (Link to image: <a href=\"https://freeimage.host/i/KjGoVv2\" class=\"inline-onebox\" rel=\"noopener nofollow ugc\">good result — Freeimage.host</a>)</p>\n<pre><code class=\"lang-auto\">x 139.614 y 117.224 w 180.547 h 177.173 class_id 47 class_score 0.959822\nx 319.697 y 323.333 w 636.135 h 627.457 class_id 60 class_score 0.26418\nx 493.684 y 249.387 w 236.908 h 206.874 class_id 46 class_score 0.924733\n</code></pre>\n<p>BAD results rectangle output: (Link to image: <a href=\"https://freeimage.host/i/KjGoWpS\" class=\"inline-onebox\" rel=\"noopener nofollow ugc\">bad result — Freeimage.host</a>)</p>\n<pre><code class=\"lang-auto\">x 132.563 y 616.468 w 266.61 h 47.1793 class_id 12 class_score 621.335\nx 144.472 y 617.792 w 283.971 h 44.7845 class_id 7 class_score 621.335\nx 166.978 y 620.281 w 331.142 h 40.2383 class_id 2 class_score 621.335\nx 192.263 y 621.335 w 379.946 h 38.3646 class_id 2 class_score 620.519\nx 212.024 y 620.519 w 434.511 h 40.2094 class_id 2 class_score 618.833\nx 234.077 y 618.833 w 470.669 h 43.7068 class_id 2 class_score 617.004\nx 263.682 y 617.004 w 470.693 h 47.3287 class_id 2 class_score 614.085\nx 297.421 y 614.085 w 470.935 h 53.1138 class_id 2 class_score 610.107\nx 331.886 y 610.107 w 474.087 h 61.0482 class_id 2 class_score 607.41\nx 361.037 y 607.41 w 480.529 h 66.4008 class_id 27 class_score 607.363\nx 387.238 y 606.562 w 482.929 h 67.9863 class_id 22 class_score 607.363\nx 414.299 y 605.055 w 474.496 h 70.7969 class_id 17 class_score 607.363\nx 425.989 y 600.909 w 436.541 h 78.6324 class_id 12 class_score 607.363\n</code></pre>\n<p>You can clearly see, that the max “class_score” is equal to the next rectangle Y pos… Which obviously produces broken results, as well as a decreasing value pattern.</p>\n<p>This model has been trained with only one class (id 0) but the class ids 12, 7, 2, 27, 22, 17 are as well either random results or something else.<br>\nThere are 8400 rectangles detected, some are reduced by NMSBoxes(opencv), the same value as the output in rows. Since the class_score is random, all the rectangles predictions are random as well.</p>\n<p>I tried to load the custom model into pytorch directly with python and no c++ OpenCV, but i get some weird error when i try load the model, it says:</p>\n<pre><code class=\"lang-auto\"> File \"<frozen runpy>\", line 198, in _run_module_as_main\n File \"<frozen runpy>\", line 88, in _run_code\n File \"......py_detect.py\", line 21, in <module>\n pred = model([img])\n TypeError: 'dict' object is not callable\n</code></pre>\n<p>I don’t use python, i don’t know what it is, and i didn’t find any specific solution for this, and i have no more time, so i am unable to test if by chance it works correctly this way.</p>\n<p>The last thing, in this video (put this code “3XmjyBE8xVA“ in youtube’s watch?v= since i can put only 2 links) at time 13:29, the dude uses this code:</p>\n<p>He multiplies the x and w by the with and height in pixels, which suggests that the X/Y values MUST be in 0-1 range, meaning that to get 320x320 pixels, the value must be (0.5, 0.5) which as well he suggested, then the rectangle is adjusted by it’s center</p>\n<pre data-code-wrap=\"cpp\"><code class=\"lang-cpp\">float x = data[0], y = data[1], w = data[2], h = data[3];\nint left = x * modelInput.cols - w * modelInput.cols / 2;\nint top = y * modelInput.rows - h * modelInput.rows / 2;\nint width = w * modelInput.cols;\nint height = h * modelInput.rows;\n\n</code></pre>\n<p>However i am getting the values in pixels in both cases(custom broken model and the working downloaded ones), if i use his suggestions then i will get values like 40000x50000 which is obviously out of boundary</p>\n<pre data-code-wrap=\"cpp\"><code class=\"lang-cpp\">int left = x - w/2;\nint top = y - h/2;\nint width = w;\nint height = h;\n</code></pre>\n<p>I tried to do everything i could, but nothing seems to work. I include as well the full training config</p>\n<blockquote>\n<p>task: detect<br>\nmode: train<br>\nmodel: yolov8s.pt<br>\ndata: data.yaml<br>\nepochs: 90<br>\ntime: null<br>\npatience: 100<br>\nbatch: 16<br>\nimgsz: 640<br>\nsave: true<br>\nsave_period: -1<br>\ncache: false<br>\ndevice: null<br>\nworkers: 8<br>\nproject: null<br>\nname: train2<br>\nexist_ok: false<br>\npretrained: true<br>\noptimizer: auto<br>\nverbose: true<br>\nseed: 0<br>\ndeterministic: true<br>\nsingle_cls: false<br>\nrect: false<br>\ncos_lr: false<br>\nclose_mosaic: 10<br>\nresume: false<br>\namp: true<br>\nfraction: 1.0<br>\nprofile: true<br>\nfreeze: null<br>\nmulti_scale: false<br>\ncompile: false<br>\noverlap_mask: true<br>\nmask_ratio: 4<br>\ndropout: 0.0<br>\nval: true<br>\nsplit: val<br>\nsave_json: false<br>\nconf: null<br>\niou: 0.7<br>\nmax_det: 300<br>\nhalf: false<br>\ndnn: false<br>\nplots: true<br>\nsource: null<br>\nvid_stride: 1<br>\nstream_buffer: false<br>\nvisualize: false<br>\naugment: false<br>\nagnostic_nms: false<br>\nclasses: null<br>\nretina_masks: false<br>\nembed: null<br>\nshow: false<br>\nsave_frames: false<br>\nsave_txt: false<br>\nsave_conf: false<br>\nsave_crop: false<br>\nshow_labels: true<br>\nshow_conf: true<br>\nshow_boxes: true<br>\nline_width: null<br>\nformat: torchscript<br>\nkeras: false<br>\noptimize: false<br>\nint8: false<br>\ndynamic: false<br>\nsimplify: true<br>\nopset: null<br>\nworkspace: null<br>\nnms: false<br>\nlr0: 0.01<br>\nlrf: 0.01<br>\nmomentum: 0.937<br>\nweight_decay: 0.0005<br>\nwarmup_epochs: 3.0<br>\nwarmup_momentum: 0.8<br>\nwarmup_bias_lr: 0.1<br>\nbox: 7.5<br>\ncls: 0.5<br>\ndfl: 1.5<br>\npose: 12.0<br>\nkobj: 1.0<br>\nnbs: 64<br>\nhsv_h: 0.015<br>\nhsv_s: 0.7<br>\nhsv_v: 0.4<br>\ndegrees: 0.0<br>\ntranslate: 0.1<br>\nscale: 0.5<br>\nshear: 0.0<br>\nperspective: 0.0<br>\nflipud: 0.0<br>\nfliplr: 0.5<br>\nbgr: 0.0<br>\nmosaic: 1.0<br>\nmixup: 0.0<br>\ncutmix: 0.0<br>\ncopy_paste: 0.0<br>\ncopy_paste_mode: flip<br>\nauto_augment: randaugment<br>\nerasing: 0.4<br>\ncfg: null<br>\ntracker: botsort.yaml</p>\n</blockquote>",863 "post_number": 1,864 "post_type": 1,865 "posts_count": 4,866 "updated_at": "2025-10-08T11:13:01.563Z",867 "reply_count": 1,868 "reply_to_post_number": null,869 "quote_count": 0,870 "incoming_link_count": 15,871 "reads": 10,872 "readers_count": 9,873 "score": 82.0,874 "yours": false,875 "topic_id": 223524,876 "topic_slug": "random-object-detection-results",877 "display_username": "",878 "primary_group_name": null,879 "flair_name": null,880 "flair_url": null,881 "flair_bg_color": null,882 "flair_color": null,883 "flair_group_id": null,884 "badges_granted": [],885 "version": 2,886 "can_edit": false,887 "can_delete": false,888 "can_recover": false,889 "can_see_hidden_post": false,890 "can_wiki": false,891 "link_counts": [892 {893 "url": "https://freeimage.host/i/KjGoVv2",894 "internal": false,895 "reflection": false,896 "title": "good result — Freeimage.host",897 "clicks": 0898 },899 {900 "url": "https://freeimage.host/i/KjGoWpS",901 "internal": false,902 "reflection": false,903 "title": "bad result — Freeimage.host",904 "clicks": 0905 }906 ],907 "read": true,908 "user_title": null,909 "bookmarked": false,910 "actions_summary": [],911 "moderator": false,912 "admin": false,913 "staff": false,914 "user_id": 86088,915 "hidden": false,916 "trust_level": 0,917 "deleted_at": null,918 "user_deleted": false,919 "edit_reason": null,920 "can_view_edit_history": true,921 "wiki": false,922 "post_url": "/t/random-object-detection-results/223524/1",923 "can_accept_answer": false,924 "can_unaccept_answer": false,925 "accepted_answer": false,926 "topic_accepted_answer": null,927 "can_vote": false928 },929 {930 "id": 476080,931 "name": "",932 "username": "Alberto500",933 "avatar_template": "/letter_avatar_proxy/v4/letter/a/e9bcb4/{size}.png",934 "created_at": "2025-10-09T09:16:18.063Z",935 "cooked": "<p>No one knows anything?</p>",936 "post_number": 2,937 "post_type": 1,938 "posts_count": 4,939 "updated_at": "2025-10-09T09:16:18.063Z",940 "reply_count": 0,941 "reply_to_post_number": null,942 "quote_count": 0,943 "incoming_link_count": 2,944 "reads": 7,945 "readers_count": 6,946 "score": 11.4,947 "yours": false,948 "topic_id": 223524,949 "topic_slug": "random-object-detection-results",950 "display_username": "",951 "primary_group_name": null,952 "flair_name": null,953 "flair_url": null,954 "flair_bg_color": null,955 "flair_color": null,956 "flair_group_id": null,957 "badges_granted": [],958 "version": 1,959 "can_edit": false,960 "can_delete": false,961 "can_recover": false,962 "can_see_hidden_post": false,963 "can_wiki": false,964 "read": true,965 "user_title": null,966 "bookmarked": false,967 "actions_summary": [],968 "moderator": false,969 "admin": false,970 "staff": false,971 "user_id": 86088,972 "hidden": false,973 "trust_level": 0,974 "deleted_at": null,975 "user_deleted": false,976 "edit_reason": null,977 "can_view_edit_history": true,978 "wiki": false,979 "post_url": "/t/random-object-detection-results/223524/2",980 "can_accept_answer": false,981 "can_unaccept_answer": false,982 "accepted_answer": false,983 "topic_accepted_answer": null984 },985 {986 "id": 476156,987 "name": "",988 "username": "ptrblck",989 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",990 "created_at": "2025-10-13T20:07:46.890Z",991 "cooked": "<aside class=\"quote no-group\" data-username=\"Alberto500\" data-post=\"1\" data-topic=\"223524\">\n<div class=\"title\">\n<div class=\"quote-controls\"></div>\n<img alt=\"\" width=\"24\" height=\"24\" src=\"https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/a/e9bcb4/48.png\" class=\"avatar\"> Alberto500:</div>\n<blockquote>\n<pre><code class=\"lang-auto\">TypeError: 'dict' object is not callable\n</code></pre>\n</blockquote>\n</aside>\n<p>This error is often raised of you only loaded the <code>state_dict</code> and try to call it instead of loading it into a model instance via <code>model.load_state_dict</code>.</p>\n<p>I’m not familiar with your code so don’t know why outputs seems to be mixed up.</p>",992 "post_number": 3,993 "post_type": 1,994 "posts_count": 4,995 "updated_at": "2025-10-13T20:07:46.890Z",996 "reply_count": 1,997 "reply_to_post_number": null,998 "quote_count": 1,999 "incoming_link_count": 0,1000 "reads": 4,1001 "readers_count": 3,1002 "score": 5.8,1003 "yours": false,1004 "topic_id": 223524,1005 "topic_slug": "random-object-detection-results",1006 "display_username": "",1007 "primary_group_name": null,1008 "flair_name": null,1009 "flair_url": null,1010 "flair_bg_color": null,1011 "flair_color": null,1012 "flair_group_id": null,1013 "badges_granted": [],1014 "version": 1,1015 "can_edit": false,1016 "can_delete": false,1017 "can_recover": false,1018 "can_see_hidden_post": false,1019 "can_wiki": false,1020 "read": true,1021 "user_title": "",1022 "bookmarked": false,1023 "actions_summary": [],1024 "moderator": true,1025 "admin": true,1026 "staff": true,1027 "user_id": 3534,1028 "hidden": false,1029 "trust_level": 2,1030 "deleted_at": null,1031 "user_deleted": false,1032 "edit_reason": null,1033 "can_view_edit_history": true,1034 "wiki": false,1035 "post_url": "/t/random-object-detection-results/223524/3",1036 "can_accept_answer": false,1037 "can_unaccept_answer": false,1038 "accepted_answer": false,1039 "topic_accepted_answer": null1040 },1041 {1042 "id": 476362,1043 "name": "",1044 "username": "Alberto500",1045 "avatar_template": "/letter_avatar_proxy/v4/letter/a/e9bcb4/{size}.png",1046 "created_at": "2025-10-25T13:05:06.334Z",1047 "cooked": "<p>The errors were caused by wrong class number, it was set by default to 80 from one place i borrowed the code to load the bytes, but since i had 1 class only, the results were random. It would load some other values, and because the trained models i downloaded had exactly 80 classes, it would pass.</p>\n<p>I thought it had something to do with my trained models, but it didn’t.</p>",1048 "post_number": 4,1049 "post_type": 1,1050 "posts_count": 4,1051 "updated_at": "2025-10-25T13:08:02.252Z",1052 "reply_count": 0,1053 "reply_to_post_number": 3,1054 "quote_count": 0,1055 "incoming_link_count": 0,1056 "reads": 3,1057 "readers_count": 2,1058 "score": 0.6,1059 "yours": false,1060 "topic_id": 223524,1061 "topic_slug": "random-object-detection-results",1062 "display_username": "",1063 "primary_group_name": null,1064 "flair_name": null,1065 "flair_url": null,1066 "flair_bg_color": null,1067 "flair_color": null,1068 "flair_group_id": null,1069 "badges_granted": [],1070 "version": 1,1071 "can_edit": false,1072 "can_delete": false,1073 "can_recover": false,1074 "can_see_hidden_post": false,1075 "can_wiki": false,1076 "read": true,1077 "user_title": null,1078 "reply_to_user": {1079 "id": 3534,1080 "username": "ptrblck",1081 "name": "",1082 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png"1083 },1084 "bookmarked": false,1085 "actions_summary": [],1086 "moderator": false,1087 "admin": false,1088 "staff": false,1089 "user_id": 86088,1090 "hidden": false,1091 "trust_level": 0,1092 "deleted_at": null,1093 "user_deleted": false,1094 "edit_reason": null,1095 "can_view_edit_history": true,1096 "wiki": false,1097 "post_url": "/t/random-object-detection-results/223524/4",1098 "can_accept_answer": false,1099 "can_unaccept_answer": false,1100 "accepted_answer": false,1101 "topic_accepted_answer": null1102 }1103 ],1104 "stream": [1105 476052,1106 476080,1107 476156,1108 4763621109 ]1110 },1111 "timeline_lookup": [1112 [1113 1,1114 171115 ],1116 [1117 2,1118 161119 ],1120 [1121 3,1122 121123 ],1124 [1125 4,1126 01127 ]1128 ],1129 "suggested_topics": [1130 {1131 "fancy_title": "Correct Implementation of Beta-VAE Reconstruction Loss with ViT Encoder-Decoder Architecture",1132 "id": 214087,1133 "title": "Correct Implementation of Beta-VAE Reconstruction Loss with ViT Encoder-Decoder Architecture",1134 "slug": "correct-implementation-of-beta-vae-reconstruction-loss-with-vit-encoder-decoder-architecture",1135 "posts_count": 1,1136 "reply_count": 0,1137 "highest_post_number": 1,1138 "image_url": null,1139 "created_at": "2024-12-11T08:43:09.073Z",1140 "last_posted_at": "2024-12-11T08:43:09.185Z",1141 "bumped": true,1142 "bumped_at": "2024-12-11T08:54:44.308Z",1143 "archetype": "regular",1144 "unseen": false,1145 "pinned": false,1146 "unpinned": null,1147 "visible": true,1148 "closed": false,1149 "archived": false,1150 "bookmarked": null,1151 "liked": null,1152 "tags_descriptions": {},1153 "like_count": 0,1154 "views": 245,1155 "category_id": 1,1156 "featured_link": null,1157 "has_accepted_answer": false,1158 "posters": [1159 {1160 "extras": "latest single",1161 "description": "Original Poster, Most Recent Poster",1162 "user": {1163 "id": 81444,1164 "username": "Janina",1165 "name": "Janina ",1166 "avatar_template": "/user_avatar/discuss.pytorch.org/janina/{size}/74468_2.png",1167 "trust_level": 11168 }1169 }1170 ]1171 },1172 {1173 "fancy_title": "Using BatchNorm1d for standardization",1174 "id": 214473,1175 "title": "Using BatchNorm1d for standardization",1176 "slug": "using-batchnorm1d-for-standardization",1177 "posts_count": 2,1178 "reply_count": 0,1179 "highest_post_number": 2,1180 "image_url": null,1181 "created_at": "2024-12-20T23:17:37.293Z",1182 "last_posted_at": "2024-12-20T23:21:22.922Z",1183 "bumped": true,1184 "bumped_at": "2024-12-20T23:21:22.922Z",1185 "archetype": "regular",1186 "unseen": false,1187 "pinned": false,1188 "unpinned": null,1189 "visible": true,1190 "closed": false,1191 "archived": false,1192 "bookmarked": null,1193 "liked": null,1194 "tags_descriptions": {},1195 "like_count": 0,1196 "views": 35,1197 "category_id": 1,1198 "featured_link": null,1199 "has_accepted_answer": false,1200 "posters": [