Skip to content

Instantly share code, notes, and snippets.

View bodokaiser's full-sized avatar
😀
Happy to be here!

Bodo Kaiser bodokaiser

😀
Happy to be here!
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import numpy as np
import tensorflow as tf
SIZE = int(64e6)
def _bytes_feature(value):
return tf.train.Feature(bytes_list=tf.train.BytesList(value=value))
export PYTHON_CONFIGURE_OPTS=--enable-framework
export EDITOR=vim
export CLICOLOR=1
export LANG=en_US.UTF-8
@bodokaiser
bodokaiser / grid.py
Last active September 24, 2017 09:29
How to construct a 3d grid in tensorflow (equivalent functions exist in numpy).
import tensorflow as tf
# volume shape: H x W x D
# cartesian notation (x,y):
# (0,0) (1,0) (2,0) ... (W-1,0)
# (0,1) (1,1) (2,1) ... (W-1,1)
# index notation (i,j):
# (0,0) (0,1) (0,2) ... (0,W-1)
@bodokaiser
bodokaiser / project-3d.py
Created September 21, 2017 07:46
project 3d volumes along each axes.
import math
import numpy as np
from matplotlib import pyplot as plt
from matplotlib.widgets import Slider
def show_volumes_projection(volumes):
n = len(volumes)
<html>
<head></head>
<body>
<ul></ul>
<script>
const PARSER = 'https://raw.githubusercontent.com/ORCID/bibtexParseJs/master/bibtexParse.js'
fetch(PARSER)
.then(res => res.text())
.then(eval)
name: "VGG_ILSVRC_16_layer"
layer {
name: "data"
type: "DenseImageData"
top: "data"
top: "label"
dense_image_data_param {
source: "/SegNet/CamVid/train.txt" # Change this to the absolute path to your data file
batch_size: 4 # Change this number to a batch size that will fit on your GPU
shuffle: true
name: "ResNet-101"
input: "data"
input_dim: 1
input_dim: 3
input_dim: 224
input_dim: 224
layer {
bottom: "data"
top: "conv1"
name: "${NET_ID}"
layer {
name: "data"
type: "ImageSegData"
top: "data"
top: "label"
#top: "data_dim"
include {
phase: TRAIN