Skip to content

Instantly share code, notes, and snippets.

View makora9143's full-sized avatar

Makoto Kawano makora9143

View GitHub Profile
@makora9143
makora9143 / flax-vae.py
Last active June 9, 2023 14:41
Variational Autoencoder with Flax
from absl import app
from absl import flags
import jax.numpy as jnp
import numpy as np
import jax
from jax import nn as jnn
from jax import random
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.
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import theano
import theano.tensor as T
class Layer(object):
def __init__(self, input_dim, output_dim, activation=None, rng_seed=1234):
@makora9143
makora9143 / cnn.py
Created October 23, 2015 14:37
畳み込みニューラルネットワーク
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import theano
import theano.tensor as T
from theano.tensor.nnet import conv
import numpy as np
bindkey -e
bindkey "^P" history-beginning-search-backward-end
bindkey "^N" history-beginning-search-forward-end
bindkey "^[[Z" reverse-menu-complete
autoload history-search-end
autoload -Uz compinit && compinit -u
autoload -Uz colors && colors
eval $(gdircolors ~/config/dircolors-solarized/dircolors.ansi-universal)
# zstyle ':completion:*' list-colors 'di=36' 'ln=35'
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import os
import json
import datetime
from tornado import httpserver, web, websocket, ioloop, options
import numpy
{
"auto_indent": true,
"bold_folder_labels": true,
"build_env":
{
},
"caret_style": "solid",
"color_scheme": "Packages/Colorsublime-Themes/Solarized-original.tmTheme",
"comp_lint_enabled": false,
"default_encoding": "UTF-8",
@makora9143
makora9143 / gist:8be8f296f8d455b9fddb
Last active August 29, 2015 14:18
zshrc version2
bindkey -e
bindkey "^P" history-beginning-search-backward-end
bindkey "^N" history-beginning-search-forward-end
bindkey "^[[Z" reverse-menu-complete
autoload history-search-end
autoload -U compinit && compinit -u
autoload -U colors && colors
eval $(gdircolors ~/config/dircolors-solarized/dircolors.ansi-universal)
# zstyle ':completion:*' list-colors 'di=36' 'ln=35'
@makora9143
makora9143 / make_data.py
Created March 11, 2015 13:49
for create train validate test data.
#! /usr/bin/env python
# -*- encoding: utf-8 -*-
import numpy
import random
hoge = numpy.array([[33, 0, 2],
[76, 123, 0],
[86, 13, 54],