Skip to content

Commit

Permalink
Merge pull request #1966 from philkr/python_fixes
Browse files Browse the repository at this point in the history
cmake and python3 bugfixes for #1939 and #1923
  • Loading branch information
longjon committed Mar 4, 2015
2 parents 85bb397 + 7651970 commit 136139b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if(NOT HAVE_PYTHON)
endif()

include_directories(${PYTHON_INCLUDE_DIRS} ${NUMPY_INCLUDE_DIR} ${Boost_INCLUDE_DIRS})
file(GLOB_RECURSE python_srcs ${CMAKE_SOURCE_DIR}/python/*.cpp)
file(GLOB_RECURSE python_srcs ${PROJECT_SOURCE_DIR}/python/*.cpp)

add_library(pycaffe SHARED ${python_srcs})
target_link_libraries(pycaffe ${Caffe_LINK} ${PYTHON_LIBRARIES} ${Boost_LIBRARIES})
Expand Down
4 changes: 2 additions & 2 deletions python/caffe/pycaffe.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ def _Net_params(self):

@property
def _Net_inputs(self):
return [self.blobs.keys()[i] for i in self._inputs]
return [list(self.blobs.keys())[i] for i in self._inputs]


@property
def _Net_outputs(self):
return [self.blobs.keys()[i] for i in self._outputs]
return [list(self.blobs.keys())[i] for i in self._outputs]


def _Net_forward(self, blobs=None, start=None, end=None, **kwargs):
Expand Down

0 comments on commit 136139b

Please sign in to comment.