This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// libfcgi-dev includes | |
#define NO_FCGI_DEFINES 1 | |
//#include <fcgio.h> | |
#include <fcgi_config.h> | |
#include <fcgi_stdio.h> | |
#include <string.h> | |
int main() | |
{ | |
FCGX_Request request; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "thread.h" | |
#include <stdio.h> | |
#ifdef __WIN32__ | |
#include <windows.h> | |
#else | |
#include <pthread.h> | |
#include <stdlib.h> | |
#endif // __WIN32__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
import imageio | |
from PIL import Image | |
import numpy as np | |
import keras | |
from keras.layers import Input, Dense, Conv2D, MaxPooling2D, AveragePooling2D, ZeroPadding2D, Dropout, Flatten, Concatenate, Reshape, Activation | |
from keras.models import Model | |
from keras.regularizers import l2 | |
from keras.optimizers import SGD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""example of converting a numpy array to a C++ valarray and back in cython | |
using copies. | |
Compile with `python setup.py build_ext --inplace` | |
Example | |
------- | |
>>> import cpptest, numpy as np | |
>>> x = np.array([0., 1., 2.]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Compile for emscripten using | |
// emcc -Iinclude SingleFileOpenGLTex.cpp \ | |
-O2 -std=c++14 -s TOTAL_MEMORY=33554432 -s USE_SDL_IMAGE=2 -s SDL2_IMAGE_FORMATS='["png"]' --preload-file examples/data -s USE_SDL=2 -o html/SingleFileOpenGLTex.html | |
// where the following images must be located in a subfolder | |
// - examples/data/test.png | |
// - examples/data/cartman.png | |
// - examples/data/cube-negx.png | |
// - examples/data/cube-negz.png | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "MOBILENET" | |
layer { | |
name: "train-data" | |
type: "Data" | |
top: "data" | |
top: "label" | |
transform_param { | |
mirror: true | |
crop_size: 224 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "MOBILENET_V2" | |
layer { | |
name: "train-data" | |
type: "Data" | |
top: "data" | |
top: "label" | |
transform_param { | |
mirror: true | |
crop_size: 224 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ResNet18 | |
name: "ResNet18" | |
layer { | |
name: "train-data" | |
type: "Data" | |
top: "data" | |
top: "label" | |
transform_param { | |
mirror: true | |
crop_size: 224 |