- mitsuruog
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
BASE_PATH=result/rnn/pad.ns-25.bs-20.nl-2.hs-20 sh rnn.sh --padding t --num_steps 25 --batch_size 20 --num_layers 2 --hidden_size 20 | |
# かなり良かった | |
BASE_PATH=result/rnn/pad.ns-25.bs-40.nl-2.hs-20 sh rnn.sh --padding t --num_steps 25 --batch_size 40 --num_layers 2 --hidden_size 20 | |
# 少し悪かった(2->eが多かったようだ) | |
BASE_PATH=result/rnn/nopad.ns-25.bs-40.nl-2.hs-20 sh rnn.sh --nopadding --num_steps 25 --batch_size 40 --num_layers 2 --hidden_size 20 | |
BASE_PATH=result/rnn/pad.ns-25.bs-100.nl-2.hs-20 sh rnn.sh --padding t --num_steps 25 --batch_size 100 --num_layers 2 --hidden_size 20 | |
BASE_PATH=result/rnn/nopad.ns-25.bs-100.nl-2.hs-20 sh rnn.sh --nopadding --num_steps 25 --batch_size 100 --num_layers 2 --hidden_size 20 |
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
#!/bin/sh | |
DATASET_PATH=${DATASET_PATH:-"sample/seq_dataset.pkl"} | |
BP="result/rnn/$(date '+%Y%m%d-%H%M%S')" | |
BASE_PATH=${BASE_PATH:-$BP} | |
MODEL_PATH="${BASE_PATH}/seq_model.pkl" | |
SAMPLING_PATH="${BASE_PATH}/seq_sample.txt" | |
FIGURE_PATH="${BASE_PATH}/figure.png" |
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 | |
"""Compare data distribution""" | |
import json | |
from itertools import chain | |
import cPickle as pickle | |
import tensorflow as tf | |
import pandas as pd |
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 | |
"""Create Sample Sequence Data""" | |
import random | |
from cPickle import dump, HIGHEST_PROTOCOL | |
import tensorflow as tf | |
import json |
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/python | |
# -*- coding: utf-8 -*- | |
import cv2 | |
import argparse | |
import os | |
import numpy | |
parser = argparse.ArgumentParser() | |
parser.add_argument("source_dir") | |
parser.add_argument("target_dir") |
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 bash | |
# | |
# Author: postmodern | |
# Description: | |
# Rips a DVD to a H.264 MKV file, with chapters and tags. Ignores any | |
# bad blocks or sectors on the DVD. | |
# Dependencies: | |
# * gddrescue | |
# * handbrake-cli | |
# * mkvtoolnix |
これは stfuawsc_itg Advent Calendar 2014 4日目の記事です。
プログラミングをしていると、いろいろなバージョンの環境を行ったり来たりしたくなることがあります。たとえば言語処理は python 2 へ nltk を入れてやりたい。シミュレーションは python 3 へ numpy 入れてやりたいとか。
そういうふうに言語やモジュールのバージョンをいろいろ組合せた環境を気軽に切り替えられると便利です。
実際そういうことを可能にするツールはたくさんあります。virtualenv, pyenv など。
ここで紹介する conda というツールもその1つです。
virtualenv などでは、モジュールを入れるときは通常の python の流儀でインストールするのですが、インストールがうまくいかないというのはよくあることです。conda ではあらかじめビルドされたものを入れるので、楽です。もちろん conda に用意されていないモジュールもありますが、そういうのは pip 等通常の方法で入れて共存できます。
ではさっそく conda で python の環境を作る方法です。