Skip to content

Commit

Permalink
Merge pull request BVLC#834 from qipeng/dev
Browse files Browse the repository at this point in the history
Included cmath in common.hpp to avoid isnan complaints from the xcode co...
  • Loading branch information
Yangqing committed Aug 3, 2014
2 parents b6980eb + fc4e1d1 commit 6b6b9b5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions include/caffe/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <boost/shared_ptr.hpp>
#include <glog/logging.h>

#include <cmath>
#include <map>
#include <set>
#include <string>
Expand Down Expand Up @@ -71,6 +72,7 @@ using boost::shared_ptr;
// Common functions and classes from std that caffe often uses.
using std::fstream;
using std::ios;
using std::isnan;
using std::iterator;
using std::make_pair;
using std::map;
Expand Down
2 changes: 1 addition & 1 deletion matlab/caffe/matcaffe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ static mxArray* do_get_weights() {
mxArray* mx_layer_cells = NULL;
if (layer_names[i] != prev_layer_name) {
prev_layer_name = layer_names[i];
const mwSize dims[2] = {layer_blobs.size(), 1};
const mwSize dims[2] = {static_cast<mwSize>(layer_blobs.size()), 1};
mx_layer_cells = mxCreateCellArray(2, dims);
mxSetField(mx_layers, mx_layer_index, "weights", mx_layer_cells);
mxSetField(mx_layers, mx_layer_index, "layer_names",
Expand Down
2 changes: 1 addition & 1 deletion src/caffe/test/test_solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ TYPED_TEST(SolverTest, TestInitTrainTestNets) {
" } "
"} ";
this->InitSolverFromProtoString(proto);
ASSERT_TRUE(this->solver_->net());
ASSERT_TRUE(this->solver_->net() != NULL);
EXPECT_TRUE(this->solver_->net()->has_layer("loss"));
EXPECT_FALSE(this->solver_->net()->has_layer("accuracy"));
ASSERT_EQ(2, this->solver_->test_nets().size());
Expand Down

0 comments on commit 6b6b9b5

Please sign in to comment.