创建带有咖啡因浮点数的hfd5 [英] create hfd5 with float numbers for caffe

查看:84
本文介绍了创建带有咖啡因浮点数的hfd5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想提供标签的caffe向量(多标签回归问题),因此我使用了以下链接用于创建hdf5文件.
使用此代码,我创建了一个image_list.txt,该文件在每行中包含文件路径和浮动标签,例如

I want to feed caffe vectors of labels (multi label regression problem), so I have used the following link for creating hdf5 files.
Using this code, I created an image_list.txt which contains path of files and float labels in each line, e.g.

/home/deep/00000.bmp  0.9997 0.0236 -0.0082 -0.0231 0.9980 0.0588 0.0096 -0.0586 0.9982 -0.0046 0.1084 0.3938

但似乎仅适用于整数标签.
当我运行demo.m时,出现以下错误:

but it seems that it only works for integer label.
when I run demo.m the following error comes:

使用dataread
时出错 无法从文件(行1,字段3)读取整数==> .9997 0.0236 -0.0082 -0.0231 0.9980 0.0588 0.

Error using dataread
Trouble reading integer from file (row 1, field 3) ==> .9997 0.0236 -0.0082 -0.0231 0.9980 0.0588 0.

推荐答案

如果您还使用caffe的C ++接口,我想和这个此处提供了一个学习面部表情标签分布的简单示例,矢量大小为8.

If you also use caffe's C++ interface, I would like to share you with this Multitask DataLayer and it supports float typed label vector for regression tasks. Here provides a simple example for learning facial expressions' label distribution which is a vector size of 8.

这篇关于创建带有咖啡因浮点数的hfd5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆