当前位置:网站首页>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 !
边栏推荐
- 49-OpenCv深入分析轮廓
- Analysis and recurrence of network security vulnerabilities
- leetcode刷题,我推荐B站这个妹子学霸的视频
- uniapp上下滑屏切换支持视频和图片轮播实现,类似抖音效果
- c语言中函数的介绍(血书20000字!!!!)
- How to write a JMeter script common to the test team
- How does QT delete all controls in a layout?
- 数字签名和CA证书
- classLoader加载的class的回收
- Recruiting talents, gbase high-end talent recruitment in progress
猜你喜欢

When will brain like intelligence, which is popular in academia, land? Let's listen to what the industry masters say - qubits, colliders, x-knowledge Technology

业务数字化飞速奔跑,管理数字化亟待出发
![第2章-2 计算分段函数[1]](/img/40/cad6bf92849624199af0fd1ba1d433.jpg)
第2章-2 计算分段函数[1]

Vk1620 temperature controller / smart meter LED digital display driver chip 3/4-wire interface with built-in RC oscillator to provide technical support

中标捷报!南大通用GBase 8s中标南瑞集团2022年数据库框架项目

Can‘t connect to server on ‘IP‘ (60)

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

How to build the protection system of class protection technology of 2022 series of ISO compliance (Part I)

When unity switches to another scene, he finds that the scene is dimmed

Gb/t 41479-2022 information security technology network data processing security requirements map overview
随机推荐
第2章-2 计算分段函数[1]
How to write a JMeter script common to the test team
微服务架构 Sentinel 的服务限流及熔断
Machine learning how to achieve epidemic visualization -- epidemic data analysis and prediction practice
Usage of qmap
机器学习如何做到疫情可视化——疫情数据分析与预测实战
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
2022 Niuke multi school first problem solving Report
Shell编程规范与变量
Hcip --- LDP and MPLS Technology (detailed explanation)
How does QT delete all controls in a layout?
opengauss同步状态疑问
Service current limiting and fusing of micro service architecture Sentinel
(13) Simple temperature alarm device based on 51 single chip microcomputer
Can‘t connect to server on ‘IP‘ (60)
CAT1 4G+以太网开发板232数据通过4G模块TCP发到服务器
思迈特软件完成C轮融资,让BI真正实现“普惠化”
Can‘t connect to server on ‘IP‘ (60)
One key switch circuit
When will brain like intelligence, which is popular in academia, land? Let's listen to what the industry masters say - qubits, colliders, x-knowledge Technology