当前位置:网站首页>Solution: indexerror: index 13 is out of bounds for dimension 0 with size 13
Solution: indexerror: index 13 is out of bounds for dimension 0 with size 13
2022-07-28 08:40:00 【FriendshipT】
solve :IndexError: index 13 is out of bounds for dimension 0 with size 13
An error is as follows
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-14-9c4d6dfcfce6> in <module>
24 for i in range(batch_size):
25 print(i)
---> 26 label = target.data[i]
27 class_correct[label] += correct[i].item()
28 class_total[label] += 1
IndexError: index 13 is out of bounds for dimension 0 with size 13

resolvent
Most of it is because the data samples are unbalanced , Ensure that the number of data samples is batch_size Multiple that will do !
边栏推荐
猜你喜欢

2022牛客多校第一场解题报告

No super high-rise buildings | new regulations: what information does it reveal that no new buildings above 500 meters should be built?

Analysis and recurrence of network security vulnerabilities

2022牛客多校第二场解题报告

Understand the propagation process of EMI electromagnetic interference through five diagrams - the influence of square wave steepness on high-frequency components, the spectrum graph from time sequenc

Characteristics of EMC EMI beads

5张图告诉你:同样是职场人,差距怎么这么大?

GBASE亮相联通云巡展(四川站) 以专业赋能云生态

Matlab file path

uniapp---- 获取当前位置的经纬度等信息的详细步骤(包含小程序)
随机推荐
Opengauss synchronization status query
微服务架构 Sentinel 的服务限流及熔断
Puzzle (004.3) pattern puzzle
CAT1 4g+ Ethernet development board 232 data is sent to the server through 4G module TCP
[soft test software evaluator] 2013 comprehensive knowledge over the years
2022 Niuke multi school first problem solving Report
Introduction to self drive tour of snow mountains in the West in January 2018
PHP基础知识 - PHP 使用 PDO
ciou损失
Half bridge buck circuit - record
博客搭建九:hugo添加搜索功能
GB/T 41479-2022信息安全技术 网络数据处理安全要求 导图概览
Understand the propagation process of EMI electromagnetic interference through five diagrams - the influence of square wave steepness on high-frequency components, the spectrum graph from time sequenc
Leetcode/ sum of two numbers in a sorted array
C轮融资已完成!思迈特软件领跑国内BI生态赋能,产品、服务竿头一步
The current value of uniapp's swiper dynamic setting does not take effect solution
Can‘t connect to server on ‘IP‘ (60)
Usage of qcombobox
Service current limiting and fusing of micro service architecture Sentinel
【软考软件评测师】2013综合知识历年真题