caffe 绘制acceracy曲线 IndexError: list index out of range的解决方案
来源:互联网 发布:大数据修炼系统无错 编辑:程序博客网 时间:2024/06/06 07:10
在绘制caffe的loss曲线时报错:
解决方案:首先考虑权限问题,sudo运行即可,如果解决不了则修改。/tools/extra/plot_training_log.py
def load_data(data_file, field_idx0, field_idx1): data = [[], []] with open(data_file, 'r') as f: for line in f: line = line.strip() if line[0] != '#': fields = line.split() data[0].append(float(fields[field_idx0].strip())) data[1].append(float(fields[field_idx1].strip())) return data修改后:
def load_data(data_file, field_idx0, field_idx1): data = [[], []] with open(data_file, 'r') as f: for line in f: line = line.strip() if line[0] == '#':num_fields = len(line.split()) else: fields = line.split()if len(fields) != num_fields: continue data[0].append(float(fields[field_idx0].strip())) data[1].append(float(fields[field_idx1].strip())) return data
阅读全文
0 1
- caffe 绘制acceracy曲线 IndexError: list index out of range的解决方案
- caffe 根据训练输出的log 绘制accuracy loss 曲线时遇到 IndexError:list index out of range
- IndexError: list index out of range
- Python:IndexError: list index out of range
- IndexError: list index out of range的错误原因
- IndexError: list index out of range列表索引超出范围
- **Python错误记录:IndexError: list index out of range**
- 【Bug-python】IndexError: list index out of range
- python IndexError: list assignment index out of range
- list不能修改不存在的项 IndexError: list assignment index out of range
- int(sys.argv[1]) IndexError: list index out of range报错的原因
- IndexError: tuple index out of range
- Python 爬虫 raise self._value IndexError: list index out of range
- python PIL, 错误:IndexError: string index out of range
- python 脚本IndexError: tuple index out of range
- list index out of range
- list index out of range
- 每日一坑 pyinstaller 将.py生成.exe 报错 “IndexError: tuple index out of range”
- iptables 防火墙-service02-day05-video
- 关于SAPGUI 自动登录 程序启动登录 节约SAP用户license
- 1044. 火星数字
- SpringBoot拦截器的使用
- 随笔:C++键盘输入
- caffe 绘制acceracy曲线 IndexError: list index out of range的解决方案
- Java面试题全集(上)
- Android操作SQLite轻量级的的ORM工具
- PAT 1002. A+B for Polynomials (25) c++版
- zookeeper客户端工具类
- 聊聊 Apache、Tomcat && 静态网页、动态网页
- 一个谷歌面试题
- 1045. 快速排序
- HDU 2544