Skip to content

Instantly share code, notes, and snippets.

View emmanuelol's full-sized avatar

Emmanuel emmanuelol

View GitHub Profile
@emmanuelol
emmanuelol / tensorrt.py
Created May 31, 2019 19:19 — forked from qinyao-he/tensorrt.py
Optimize frozen tensorflow graph using TensorRT
import os
import tensorflow as tf
import tensorflow.contrib.tensorrt as trt
def get_frozen_graph(graph_file):
"""Read Frozen Graph file from disk."""
with tf.gfile.FastGFile(graph_file, "rb") as f:
graph_def = tf.GraphDef()
@emmanuelol
emmanuelol / alexnet_netspec.py
Created July 24, 2018 15:29 — forked from asanakoy/alexnet_netspec.py
Generate caffe netspec file for Alexnet model
# 23.03.16, Artsiom Sanakoyeu
import caffe
from caffe import layers as L, params as P
def alexnet(train_data_source, test_data_source, mean_file, train_batch_size=128, test_batch_size=50, database_backend=P.Data.LEVELDB):
"""
Generate the caffe's network specification train_val.prototxt file for Alexnet model,
described in the [AlexNet](http://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks) publication.
"""
@emmanuelol
emmanuelol / install.md
Created April 4, 2016 05:59 — forked from floehopper/install.md
Install rtl-sdr on Raspian on Raspberry Pi
jamesmead@floehopper.local:~$ sudo dd bs=1m if=/Users/jamesmead/Downloads/2015-02-16-raspbian-wheezy.img of=/dev/disk2
pi@raspberrypi ~ $ sudo raspi-config
# Choose option 1 to "Expand Filesystem" - Ensures that all of the SD card storage is available to the OS
# Choose Finish & reboot

pi@raspberrypi ~ $ sudo apt-get update