Skip to content

Instantly share code, notes, and snippets.

View LaurentBerger's full-sized avatar

Laurent Berger LaurentBerger

View GitHub Profile
function MAJGitRepo
# $1=nom $2 $3=url
{
if [ ! -d "$myRepo/$1" ]; then
echo "clonning ${1}"
git clone $2
mkdir Build/$1
else
echo "update $1"
cd $1
name: "LeNetSimplifie2"
layer {
name: "data"
type: "MemoryData"
top: "data"
top: "label"
include {
phase: TRAIN
}
transform_param {
#!/bin/bash -e
myRepo=$(pwd)
CMAKE_CONFIG_GENERATOR="Visual Studio 15 2017 Win64"
RepoSource=Caffe
RepoBuild=CaffeBis
installDepen=G:/Lib/install
pushd Build/$RepoBuild
CMAKE_OPTIONS='-DINSTALL_PREREQUISITES:BOOL=OFF -DCOPY_PREREQUISITES:BOOL=OFF -DUSE_OPENCV:BOOL=ON -DUSE_LEVELDB:BOOL=OFF -DUSE_LMDB:BOOL=OFF -DUSE_OPENMP:BOOL=OFF -DUSE_NCCL:BOOL=OFF -DCPU_ONLY:BOOL=ON '
cmake -G"$CMAKE_CONFIG_GENERATOR" -DBUILD_SHARED_LIBS:BOOL=OFF \
-DBLAS:STRING=MKL \
#!/bin/bash -e
myRepo=$(pwd)
CMAKE_CONFIG_GENERATOR="Visual Studio 15 2017 Win64"
RepoSource=Caffe2
RepoBuild=Caffe2
installDepen=G:/Lib/install
pushd Build/$RepoBuild
CMAKE_OPTIONS=''
cmake -G"$CMAKE_CONFIG_GENERATOR" -DBUILD_SHARED_LIBS:BOOL=ON \
-DPYTHON_EXECUTABLE=c:/programdata/anaconda3/python.exe \
$ ./buildcaffe2.sh
/g/lib/Build/Caffe2 /g/lib
-- The CXX compiler identification is MSVC 19.12.25834.0
-- The C compiler identification is MSVC 19.12.25834.0
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.12.25827/bin/Hostx64/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.12.25827/bin/Hostx64/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
@LaurentBerger
LaurentBerger / gist:1de4b75aab61dd57d9493a4a97ede777
Created February 14, 2018 18:25
runnning cpp_xor windows 10 msvc 2017
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0214 19:15:50.821849 7128 solver.cpp:44] Initializing solver from parameters:
test_iter: 1
test_interval: 2000
base_lr: 0.02
display: 2000
max_iter: 5000000
lr_policy: "step"
gamma: 0.5
stepsize: 500000
#!/bin/bash -e
myRepo=$(pwd)
CMAKE_CONFIG_GENERATOR="Visual Studio 15 2017 Win64"
RepoSource=opencv
cd Build/$RepoSource
CMAKE_OPTIONS='-DBUILD_opencv_world:BOOL=OFF -DBUILD_PERF_TESTS:BOOL=OFF -DBUILD_TESTS:BOOL=ON -DBUILD_DOCS:BOOL=OFF -DWITH_CUDA:BOOL=OFF -DBUILD_EXAMPLES:BOOL=ON -DWITH_LAPACK:BOOL=ON -DCV_TRACE:BOOL=OFF'
cmake -G"$CMAKE_CONFIG_GENERATOR" \
-DTesseract_INCLUDE_DIR:PATH="${myRepo}"/Install/tesseract/include -DTesseract_LIBRARY="${myRepo}"/Install/tesseract/lib/tesseract400.lib -DLept_LIBRARY="${myRepo}"/Install/leptonica/lib/leptonica-1.74.4.lib \
-DEIGEN_DIR:PATH="$myRepo"/eigen -DEIGEN_INCLUDE_DIR="$myRepo"/eigen -DEIGEN_INCLUDE_PATH="$myRepo"/eigen \
-DCeres_DIR="$myRepo"/install/ceres-solver/cmake -Dglog_DIR:PATH="$myRepo"/install/glog/lib/cmake/glog -Dgflags_DIR:PATH="$myRepo"/install/gflags/lib/cmake/gflags \
#include <opencv2/opencv.hpp>
#include <iostream>
#include <map>
#include <opencv2/ts.hpp>
#include "opencv2/ml.hpp"
#include "opencv2/core/core_c.h"
using namespace std;
%YAML:1.0
---
opencv_ml_ann_mlp:
format: 3
layer_sizes: [ 21, 30, 3 ]
activation_function: SIGMOID_SYM
f_param1: 6.6666666666666663e-01
f_param2: 1.7159000000000000e+00
min_val: -9.4999999999999996e-01
max_val: 9.4999999999999996e-01
%YAML:1.0
---
opencv_ml_ann_mlp:
format: 3
layer_sizes: [ 21, 30, 3 ]
activation_function: SIGMOID_SYM
f_param1: 6.6666666666666663e-01
f_param2: 1.7159000000000000e+00
min_val: -9.4999999999999996e-01
max_val: 9.4999999999999996e-01