Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leaky ReLUs #105

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
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 CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ IF(BIICODE)
TARGET_COMPILE_OPTIONS(${BII_LIB_TARGET} PUBLIC -DFANN_DLL_EXPORTS)
ELSE()
IF(${examples_present})
TARGET_LINK_LIBRARIES(${BII_BLOCK_TARGET} INTERFACE gomp)
TARGET_LINK_LIBRARIES(${BII_BLOCK_TARGET} INTERFACE gomp OpenGL)
ENDIF()
ENDIF()
ELSE()
Expand Down
11 changes: 11 additions & 0 deletions examples/mkfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
</$objtype/mkfile
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason of adding this file?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Portability to Plan 9 I guess


CC=pcc
CFLAGS=-D_PLAN9_SOURCE -c
NOMK=(parallel_train.c)
TARG=`{ ls *.c | grep -v '^('$NOMK')$' | sed 's,.c$,,' }
PROGS=${TARG:%=$O.%}

all:V: $PROGS

</sys/src/cmd/mkmany
20 changes: 16 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ ELSE()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
ENDIF(NOT OPENMP_FOUND OR DISABLE_PARALLEL_FANN)

FIND_PACKAGE(OpenGL)
IF(OpenGL_FOUND)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -I${OpenGL_INCLUDE_DIR}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -I${OpenGL_INCLUDE_DIR}")
ENDIF(OpenGL_FOUND)

ADD_SUBDIRECTORY( include )

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
Expand All @@ -26,6 +32,9 @@ SET(floatfann_LIB_SRCS
ADD_LIBRARY(floatfann SHARED ${floatfann_LIB_SRCS})
ADD_LIBRARY(floatfann_static STATIC ${floatfann_LIB_SRCS})

TARGET_LINK_LIBRARIES(floatfann m EGL gbm)
TARGET_LINK_LIBRARIES(floatfann_static m EGL gbm)

SET_TARGET_PROPERTIES(floatfann PROPERTIES VERSION ${FANN_VERSION_STRING} SOVERSION ${FANN_VERSION_MAJOR})
SET_TARGET_PROPERTIES(floatfann_static PROPERTIES VERSION ${FANN_VERSION_STRING} SOVERSION ${FANN_VERSION_MAJOR})
if (UNIX)
Expand All @@ -45,6 +54,9 @@ SET(doublefann_LIB_SRCS
ADD_LIBRARY(doublefann SHARED ${doublefann_LIB_SRCS})
ADD_LIBRARY(doublefann_static STATIC ${doublefann_LIB_SRCS})

TARGET_LINK_LIBRARIES(doublefann m EGL gbm)
TARGET_LINK_LIBRARIES(doublefann_static m EGL gbm)

SET_TARGET_PROPERTIES(doublefann PROPERTIES VERSION ${FANN_VERSION_STRING} SOVERSION ${FANN_VERSION_MAJOR})
SET_TARGET_PROPERTIES(doublefann_static PROPERTIES VERSION ${FANN_VERSION_STRING} SOVERSION ${FANN_VERSION_MAJOR})
if (UNIX)
Expand All @@ -64,8 +76,8 @@ SET(fixedfann_LIB_SRCS
ADD_LIBRARY(fixedfann SHARED ${fixedfann_LIB_SRCS})
ADD_LIBRARY(fixedfann_static STATIC ${fixedfann_LIB_SRCS})

TARGET_LINK_LIBRARIES(fixedfann m)
TARGET_LINK_LIBRARIES(fixedfann_static m)
TARGET_LINK_LIBRARIES(fixedfann m EGL gbm)
TARGET_LINK_LIBRARIES(fixedfann_static m EGL gbm)

SET_TARGET_PROPERTIES(fixedfann PROPERTIES VERSION ${FANN_VERSION_STRING} SOVERSION ${FANN_VERSION_MAJOR})
SET_TARGET_PROPERTIES(fixedfann_static PROPERTIES VERSION ${FANN_VERSION_STRING} SOVERSION ${FANN_VERSION_MAJOR})
Expand All @@ -86,8 +98,8 @@ SET(fann_LIB_SRCS
ADD_LIBRARY(fann SHARED ${fann_LIB_SRCS})
ADD_LIBRARY(fann_static STATIC ${fann_LIB_SRCS})

TARGET_LINK_LIBRARIES(fann m)
TARGET_LINK_LIBRARIES(fann_static m)
TARGET_LINK_LIBRARIES(fann m EGL gbm)
TARGET_LINK_LIBRARIES(fann_static m EGL gbm)

SET_TARGET_PROPERTIES(fann PROPERTIES VERSION ${FANN_VERSION_STRING} SOVERSION ${FANN_VERSION_MAJOR})
SET_TARGET_PROPERTIES(fann_static PROPERTIES VERSION ${FANN_VERSION_STRING} SOVERSION ${FANN_VERSION_MAJOR})
Expand Down
6 changes: 6 additions & 0 deletions src/doublefann.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

/* Easy way to allow for build of multiple binaries */

#ifdef PLAN9
#include <stdio.h>
#endif

#include "config.h"
#include "doublefann.h"

Expand All @@ -28,4 +32,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "fann_train_data.c"
#include "fann_error.c"
#include "fann_cascade.c"
#ifndef PLAN9
#include "parallel_fann.c"
#endif
Loading