Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/caffe/test/test_python_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def python_net_file():


def exception_net_file():
with tempfile.NamedTemporaryFile(delete=False) as f:
with tempfile.NamedTemporaryFile(mode='w+', delete=False) as f:
f.write("""name: 'pythonnet' force_backward: true
input: 'data' input_shape { dim: 10 dim: 9 dim: 8 }
layer { type: 'Python' name: 'layer' bottom: 'data' top: 'top'
Expand Down
10 changes: 5 additions & 5 deletions tools/caffe.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#ifdef WITH_PYTHON_LAYER
#include "boost/python.hpp"
namespace bp = boost::python;
#endif

#include <glog/logging.h>

#include <cstring>
Expand All @@ -8,11 +13,6 @@
#include "boost/algorithm/string.hpp"
#include "caffe/caffe.hpp"

#ifdef WITH_PYTHON_LAYER
#include "boost/python.hpp"
namespace bp = boost::python;
#endif

using caffe::Blob;
using caffe::Caffe;
using caffe::Net;
Expand Down