Skip to content

Commit

Permalink
just in case, better handling of Caffe db cursor reset
Browse files Browse the repository at this point in the history
  • Loading branch information
beniz committed Mar 9, 2015
1 parent bb3e145 commit e301216
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/caffeinputconns.cc
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,9 @@ namespace dd
void ImgCaffeInputFileConn::reset_dv_test()
{
//_test_db = std::unique_ptr<caffe::db::DB>();
_test_db_cursor = std::unique_ptr<caffe::db::Cursor>();
if (_test_db)
_test_db_cursor = std::unique_ptr<db::Cursor>(_test_db->NewCursor());
else _test_db_cursor = std::unique_ptr<caffe::db::Cursor>();
}

}

0 comments on commit e301216

Please sign in to comment.