This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import numpy as np | |
from PIL import Image | |
import six.moves.cPickle as pickle | |
wnids = map(lambda x: x.strip(), open('wnids.txt').readlines()) | |
data = {} | |
data['train'] = {} | |
data['train']['data'] = np.ndarray(shape=(100000, 3, 64, 64), dtype=np.uint8) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from chainer import Variable, FunctionSet, optimizers | |
import chainer.functions as F | |
import data | |
import brica1 | |
class SLP(FunctionSet): | |
def __init__(self, n_input, n_output): | |
super(SLP, self).__init__( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from sklearn import svm, datasets | |
import brica1 | |
# SVM Component Definition |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ConvolutionalAutoencoder(FunctionSet): | |
def __init__(self, n_in, n_out, ksize, stride=1, pad=0, wscale=1, bias=0, nobias=False): | |
super(ConvolutionalAutoencoder, self).__init__( | |
encode=F.Convolution2D(n_in, n_out, ksize, stride=stride, pad=pad, wscale=wscale, bias=bias, nobias=nobias), | |
decode=F.Convolution2D(n_out, n_in, ksize, stride=stride, pad=pad, wscale=wscale, bias=bias, nobias=nobias) | |
) | |
def forward(self, x_data, train=True): | |
x = Variable(x_data) | |
t = Variable(x_data) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import numpy as np | |
from chainer import Variable, FunctionSet, optimizers, cuda | |
import chainer.functions as F | |
import cv2 | |
import random | |
import cPickle as pickle | |
import sys | |
class ConvolutionalAutoencoder(FunctionSet): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
my $base = "togows.dbcls.jp/entry/nucleotide"; | |
my ($prefix, $from_id, $to_id) = (@ARGV); | |
if($from_id > $to_id) { | |
($from_id, $to_id) = ($to_id, $from_id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import numpy as np | |
from sklearn.datasets import fetch_mldata | |
from chainer import Variable, FunctionSet, optimizers, cuda | |
import chainer.functions as F | |
import brica1 | |
class Perceptron(): | |
def __init__(self, n_in, n_out, use_cuda=False): | |
self.model = FunctionSet( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import numpy as np | |
from sklearn.datasets import fetch_mldata | |
from chainer import Variable, FunctionSet, optimizers, cuda | |
import chainer.functions as F | |
#import utils | |
parser = argparse.ArgumentParser(description='Chainer example: MNIST') | |
parser.add_argument('--gpu', '-g', default=-1, type=int, | |
help='GPU ID (negative value indicates CPU)') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import numpy as np | |
from chainer import cuda, Function, FunctionSet, gradient_check, Variable, optimizers | |
import chainer.functions as F | |
x_train = np.array([ | |
[[0., 0.]], | |
[[0., 1.]], | |
[[1., 0.]], | |
[[1., 1.]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/****************************************************************************** | |
** iqstat - Interactive qstat viewer | |
** | |
** Created by kotone on 2015/01/16. | |
** Copyright (c) 2015 Kotone Itaya. All rights reserved. | |
** | |
** iqstat is free software: you can redistribute it and/or modify | |
** it under the terms of the GNU General Public License as published by | |
** the Free Software Foundation, either version 3 of the License, or | |
** (at your option) any later version. |