Skip to content

Instantly share code, notes, and snippets.

View ducha-aiki's full-sized avatar

Dmytro Mishkin ducha-aiki

View GitHub Profile
@ducha-aiki
ducha-aiki / gist:21f41b1887749b122ca7
Created December 29, 2014 09:15
Imagenet val bvlc_googlenet
I1223 12:53:51.375224 23647 caffe.cpp:134] Use GPU with device ID 0
I1223 12:53:51.488831 23647 net.cpp:42] Initializing net from parameters:
name: "GoogleNet"
layers {
top: "data"
top: "label"
name: "data"
type: DATA
data_param {
source: "/home/share/storage/datasets/imagenet/dbs/ilsvrc12_val_lmdb"
This file has been truncated, but you can view the full file.
I1229 14:22:43.806607 23733 caffe.cpp:134] Use GPU with device ID 0
I1229 14:22:44.181466 23733 net.cpp:42] Initializing net from parameters:
name: "AlexNet"
layers {
top: "data"
top: "label"
name: "data"
type: DATA
data_param {
source: "/home/share/storage/datasets/imagenet/dbs/ilsvrc12_shai_val_lmdb"
name: "CIFAR10_full"
layer {
name: "cifar"
type: "Data"
top: "data"
top: "label"
include {
phase: TRAIN
}
transform_param {
@ducha-aiki
ducha-aiki / cifar10_2K_in-place.log
Created October 21, 2015 18:37
cifar10_2K_in-place
I1021 21:37:50.680150 3320 caffe.cpp:184] Using GPUs 0
I1021 21:37:50.799264 3320 solver.cpp:47] Initializing solver from parameters:
test_iter: 10
test_interval: 1000
base_lr: 0.001
display: 100
max_iter: 5000
lr_policy: "poly"
power: 0.5
momentum: 0.9
@ducha-aiki
ducha-aiki / cifar10_2K_not-in-place.log
Created October 21, 2015 18:37
cifar10_2K_not-in-place
I1021 21:39:31.658416 3427 caffe.cpp:184] Using GPUs 0
I1021 21:39:31.932163 3427 solver.cpp:47] Initializing solver from parameters:
test_iter: 10
test_interval: 1000
base_lr: 0.001
display: 100
max_iter: 5000
lr_policy: "poly"
power: 0.5
momentum: 0.9
@ducha-aiki
ducha-aiki / cifar10_full_sigmoid_solver.prototxt
Created October 22, 2015 09:05
Examples of how to use batch_norm in caffe
# The train/test net protocol buffer definition
net: "examples/cifar10/cifar10_full_sigmoid_train_test.prototxt"
# test_iter specifies how many forward passes the test should carry out.
# In the case of CIFAR10, we have test batch size 100 and 100 test iterations,
# covering the full 10,000 testing images.
test_iter: 100
# Carry out testing every 1000 training iterations.
test_interval: 1000
# The base learning rate, momentum and the weight decay of the network.
base_lr: 0.001
layer {
name: "data"
type: "Input"
top: "data"
input_param { shape: { dim: 2 dim: 1 dim: 65 dim: 65 } }
}
layer {
name: "Gx"
type: "Convolution"
@ducha-aiki
ducha-aiki / batched_grid_sampling_pytorch.py
Created March 5, 2018 12:36
Batched version of grid sampling for saving memory
import torch
import torch.nn.functional as F
from torch.autograd import Variable
def batched_grid_apply(img, grid, batch_size):
n_patches = len(grid)
if n_patches > batch_size:
bs = batch_size
n_batches = n_patches / bs + 1
for batch_idx in range(n_batches):
@ducha-aiki
ducha-aiki / res_article_hardnet
Created October 26, 2018 15:04
res_article_hardnet.m
hb_setup();
%%
res = rproc.read('scoresroot', ...
fullfile(hb_path, 'matlab', 'scores', 'default'));
norm_splits = {};
norms_path = fullfile(hb_path, 'matlab', 'data', 'best_normalizations.csv');
norms = readtable(norms_path, 'delimiter', ',');
norms.Properties.RowNames = norms.descriptor;
@ducha-aiki
ducha-aiki / install_orbslam_stuff.sh
Created January 29, 2019 14:09
Install ORBSLAM + python bindings
#!/bin/bash
DIR1=$(pwd)
MAINDIR=$(pwd)/3rdparty
mkdir ${MAINDIR}
cd ${MAINDIR}
conda create -y -n "NavAgents" python=3.6
source activate NavAgents
conda install opencv -y
conda install pytorch torchvision -c pytorch -y