-
Notifications
You must be signed in to change notification settings - Fork 491
An improvement on regression and data reading #201
Conversation
…els, and regression problems are applied. The improved Caffe can handle the standard image multi label regression problem and is very adaptable to non-standard image data. Compared to the support of native Caffe to the regression problem, this modification not only makes the use more simple, but also has a good performance in the slow convergence or non convergence of loss on some regression problems.
src/caffe/util/io.cpp
Outdated
// datum->set_label(label); | ||
// datum->set_encoded(true); | ||
// return true; | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these lines be deleted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
src/caffe/util/io.cpp
Outdated
// } | ||
|
||
CVMatToDatum(cv_img, datum); | ||
//datum->set_label(label); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete this unused line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
@@ -35,11 +35,12 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you please articulate why you made so many changes to this class? I don't think all of them are needed for this particular feature, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but these modifications do not conflict with the original Caffe. They can provide more powerful functions to meet our needs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about submit another PR for the enhancements you think useful? Let's just focus on the regression support in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your reminding. We have made changes according to your opinion and submitted PR again.The newly submitted web site is:#215. Here, I would like to explain to you our improvement. When we use the multi label regression problem of image data, I encounter the problem that LMDB database does not directly support. By modifying this class, that is, the LMDB data reading method, we solve this problem instead of converting it to H5Py. And in our testing process, we think that modification to this class is necessary.From this improvement, we find that the improvement is better than the traditional method and has a good performance on other similar problems, so we think this is an improvement on Intel coffee and we hope to get your approval.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revise the PR per review comments.
delete some useful line
Revision of code specification
Modifications are made for improvements in non-standard images or labels, and regression problems are applied. The improved Caffe can handle the standard image multi label regression problem and is very adaptable to non-standard image data. Compared to the support of native Caffe to the regression problem, this modification not only makes the use more simple, but also has a good performance in the slow convergence or non convergence of loss on some regression problems.