Skip to content

Instantly share code, notes, and snippets.

@kor01
kor01 / Compiled Model & Estimator
Last active December 10, 2018 09:54
[Tensorflow 2.0] Development Guideline
Applicability:
1. model compilation requires implementation of compute output shape
2. model compilation requires homogeneous training data tensor shapes
3. model internal attributes is set by passing a defer tensor through model call
4. model compilation is more akin to tf graph mode
@kor01
kor01 / cylinder.py
Created September 7, 2018 10:32
[vtk_python] vtk python tutorial #vtk #opengl
import vtk
# The colors module defines various useful colors.
from vtk.util.colors import tomato
cylinder = vtk.vtkCylinderSource()
# the side of the cylinder is made up with 100 edges polygon
cylinder.SetResolution(100)
@kor01
kor01 / CMakeLists.txt
Last active September 7, 2018 12:03
[opengl hello world] openGL stuffs #openGL
# cmake for opengl projects
cmake_minimum_required(VERSION 3.12)
project(opengl_stuffs)
set(CMAKE_CXX_STANDARD 11)
find_package(OpenGL)
find_package(GLUT)
find_package(GLEW)
@kor01
kor01 / syms_assumption.m
Last active December 17, 2017 00:20
[matlab symbolic] symbolic computation in matlab #symbolic #matlab
% show current assumptions
syms z
assumptions(z)
% set assumptions
syms x
assume(x >= 0)
% add assumptions
assumeAlso(x,'integer')
@kor01
kor01 / save_session.py
Created November 28, 2017 05:25
[ipython] ipython tricks
%save my_useful_session 10-20 23
@kor01
kor01 / add_bounding_box.py
Last active November 28, 2017 01:26
[CarND_classifiers] #CarND #classifiers
import numpy as np
import cv2
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
image = mpimg.imread('bbox-example-image.jpg')
# Define a function that takes an image, a list of bounding boxes,
# and optional color tuple and line thickness as inputs
# then draws boxes in that color on the output
@kor01
kor01 / plot_2d_polygon.m
Last active November 2, 2017 23:31
[matlab robotics] #robotics #matlab
hold on
plot(x(1, :), x(2,:))
@kor01
kor01 / construct_kinematics_frames.md
Last active October 25, 2017 01:29
[ros urdf] urdf files #ros #urdf

Definition and Conventions:

  • kinmematics frame of each link is infered rather than defined in urdf

  • each joint position and orientation is defined relative to it's parents kinematics frame

  • the parent kinematics frame is defined as the frame of it's parent joint

  • the kinematics frame of root link is eye(4)

@kor01
kor01 / conv_net.txt
Last active May 6, 2019 01:36
[neural net jargons] #neural_net
depth = number of channel
path / kernel = [depth, convolutional sliding window weight]
sliding window weight = [height, width, depth], where depth equals to previous image channels
feature map_i = output[i, :, :] the ith layer of the output hyper image after convolution
stride = number of pixels when shifting the kernel window
valid_padding = stop slide at the edge (without padding)
same_padding = pad with zeros to make output image the same as input
@kor01
kor01 / back_prop.txt
Last active September 19, 2017 13:35
[neural_nets_mind_bugs] #neural_nets #mind_bugs
in conventional notations:
1. layer input = the tensor before activation
2. layer output = the tensor after activation
3. next layer input = this layer output transformed by the edges
4. delta_layer = dLoss / dlayer_input