Skip to content

Instantly share code, notes, and snippets.

python mxnet/example/image-classification/train_imagenet.py --network shufflenet --data-train ~/efs/users/joshuazz/data/imagenet/record/train_480_q95.rec --data-val ~/efs/users/joshuazz/data/imagenet/record/val_256_q90.rec --batch-size 512 --gpus 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 --num-epochs 150 --lr-step-epochs 30,60,90 --min-random-scale 0.533 --lr 0.01 --disp-batches 100 --top-k 5 --data-nthreads 32 --random-mirror 1 --max-random-shear-ratio 0 --max-random-rotate-angle 0 --max-random-h 0 --max-random-l 0 --max-random-s 0 --model-prefix model/shufflenet | tee ~/efs/users/joshuazz/temp/train_imagenet_logs/shufflenet.log
name: "shufflenet"
# transform_param {
# scale: 0.017
# mirror: false
# crop_size: 224
# mean_value: [103.94,116.78,123.68]
# }
input: "data"
input_shape {
dim: 1
@zhreshold
zhreshold / demo_bench.json
Last active October 14, 2017 22:23
Sortable table d3.js
{
"nvidia-titan-x": {
"devices": [
{
"cores": "3072",
"memory": "12GB",
"memory_bandwith": "336.5GB/s",
"name": "Nvidia Titan X",
"quantity": 1
}
@zhreshold
zhreshold / bullet.js
Last active October 14, 2017 03:44
d3.js demo
(function() {
// Chart design based on the recommendations of Stephen Few. Implementation
// based on the work of Clint Ivy, Jamie Love, and Jason Davies.
// http://projects.instantcognition.com/protovis/bulletchart/
d3.bullet = function() {
var orient = "left", // TODO top & bottom
reverse = false,
duration = 0,
ranges = bulletRanges,
@zhreshold
zhreshold / resnet101_v2.sh
Last active October 12, 2017 23:31
MXNet Imagenet training configurations
python train_imagenet.py --data-train ~/data/train.rec --data-val ~/data/val.rec --gpus 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 --data-nthreads 32 --network resnet101_v2 --batch-size 256 --top-k 5 --model-prefix model/resnet101_v2 --min-random-scale 0.533 --max-random-shear-ratio 0 --max-random-rotate-angle 0 --max-random-h 0 --max-random-l 0 --max-random-s 0 --lr-step-epochs 30,60,90 --num-epochs 120 --rgb-std '58.395,57.12,57.375'
@zhreshold
zhreshold / fc_bench.py
Last active October 5, 2017 18:48
FC perf benchmark
import mxnet as mx
import numpy as np
from timeit import default_timer as timer
def get_bench_net(num_hidden=10000):
data = mx.sym.var('data')
fc = mx.sym.FullyConnected(data, num_hidden=num_hidden)
return fc
num_out = 10000
@zhreshold
zhreshold / concat.py
Created October 4, 2017 18:57
HybridBlock of concat layer
from mxnet.gluon import HybridBlock
class Concat(HybridBlock):
"""Concat operation for multiple inputs."""
def __init__(self, dim=1, **kwargs):
super(Concat, self).__init__(**kwargs)
self._kwargs = {'dim': dim}
def hybrid_forward(self, F, *args):
return F.concat(*args, name='fwd', **self._kwargs)
@zhreshold
zhreshold / README.md
Last active January 9, 2018 23:50
Super resolution example onnx

This is a demo onnx model for super resolution.

@zhreshold
zhreshold / imagenet1000_clsid_to_human.txt
Created September 26, 2017 22:15 — forked from yrevar/imagenet1000_clsidx_to_labels.txt
text: imagenet 1000 class id to human readable labels
{0: 'tench, Tinca tinca',
1: 'goldfish, Carassius auratus',
2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias',
3: 'tiger shark, Galeocerdo cuvieri',
4: 'hammerhead, hammerhead shark',
5: 'electric ray, crampfish, numbfish, torpedo',
6: 'stingray',
7: 'cock',
8: 'hen',
9: 'ostrich, Struthio camelus',
@zhreshold
zhreshold / googlenet.prototxt
Created September 15, 2017 00:25
Googlenet deploy
name: "GoogleNet"
layer {
name: "data"
type: "Input"
top: "data"
input_param { shape: { dim: 10 dim: 3 dim: 224 dim: 224 } }
}
layer {
name: "conv1/7x7_s2"
type: "Convolution"