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
'''This script goes along the blog post | |
"Building powerful image classification models using very little data" | |
from blog.keras.io. | |
It uses data that can be downloaded at: | |
https://www.kaggle.com/c/dogs-vs-cats/data | |
In our setup, we: | |
- created a data/ folder | |
- created train/ and validation/ subfolders inside 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
from scipy.misc import imread, imresize | |
from keras.layers import Input, Dense, Convolution2D, MaxPooling2D, AveragePooling2D, ZeroPadding2D, Dropout, Flatten, merge, Reshape, Activation | |
from keras.models import Model | |
from keras.regularizers import l2 | |
from keras.optimizers import SGD | |
from googlenet_custom_layers import PoolHelper,LRN | |
def create_googlenet(weights_path=None): |
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
Gdk-CRITICAL **: gdk_cursor_new_for_display: assertion 'GDK_IS_DISPLAY (display)' failed | |
Traceback (most recent call last): | |
File "app.py", line 8, in <module> | |
from labellio import Classifier, Config, ImageLoader, Label | |
File "/usr/local/lib/python2.7/dist-packages/labellio/__init__.py", line 2, in <module> | |
from labellio.classifier import Classifier | |
File "/usr/local/lib/python2.7/dist-packages/labellio/classifier.py", line 6, in <module> | |
from labellio.net import Net | |
File "/usr/local/lib/python2.7/dist-packages/labellio/net.py", line 4, in <module> | |
import caffe |
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 {Component, AfterViewInit} from 'angular2/core'; | |
@Component({ | |
selector: 'home', | |
templateUrl: './components/home/home.html' | |
}) | |
export class HomeCmp implements AfterViewInit { | |
ngAfterViewInit() { |
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
あきつ湧き宙にとどまる地獄谷 | |
いつきに夏ふと人間が宙にあり | |
かいつぶり硝子の沓を宙に見す | |
かはらけの宙とんでゆく二月かな | |
からくりの唐子宙飛ぶ飛騨の春 | |
かるがるとおんぶばつたの宙をとぶ | |
かるた取り紫式部宙に舞ふ | |
くろぐろと富士は宙吊り冬霞 | |
こたへなき雪山宙に労働歌 | |
こと切れしごとく枯蔓宙吊りに |
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
//train.pyを書き換え | |
//書き換え前 | |
parser.add_argument('--data_dir', type=str, default='data/tinyshakespeare', | |
help='data directory containing input.txt') | |
//書き換え後 | |
parser.add_argument('--data_dir', type=str, default='data/philosophy', | |
help='data directory containing input.txt') |
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
//ディレクトリを作成 | |
mkdir philosophy | |
//作成したディレクトリにinput.txtを配置 | |
char-rnn-tensorflow/data/philosophy/input.xtx |
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
//ソースをクローン | |
git clone https://github.com/sherjilozair/char-rnn-tensorflow | |
//作業フォルダへ移動 | |
cd char-rnn-tensorflow |
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
1. | |
//ソースをクローン | |
git clone https://github.com/sherjilozair/char-rnn-tensorflow | |
//作業フォルダへ移動 | |
cd char-rnn-tensorflow | |
2. | |
//ディレクトリを作成 | |
mkdir philosophy | |
//作成したディレクトリにinput.txtを配置 |
This file has been truncated, but you can view the full file.
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
機械学習向けに青空文庫から戸坂潤さんの文書を一つのファイルにまとめました。 | |
http://yozora.kazumi386.org/1/2/ndc121.html | |
============== | |
単に文芸批評だけではない。総ての評論風の批評は直接感受した印象の追跡を建前とする。ただその印象が芸術的な印象ではなくて、理論的印象や科学的印象である時、普通これを印象とは呼ばないまでで、この場合、印象の持っている印象らしい特色には別に変りがない。印象はそれを感受する人間の感覚的性能如何によって大変違って来る。印象とは刺戟に対する人格的反作用のことであろうが、そうした特色には、科学的労作を批評する場合にも極めて大きな役割を演じている。科学に於ける所謂素人や、或る意味に於ける独学者が、往々暴露する欠陥は、正にこの科学的理論的印象能力の薄弱さに関っている。本質的に高い仕事と本質的に低い仕事とを甄別するのは、この印象の確実さである。印象はその人の眼の高さのバロメーターである。この印象の追跡が一般的に批評だ。 | |
芸術(作品、作家、芸術、現象、を含めて)に対する批評が、印象の追跡であることは、改めて云う必要はない。或いは又、いく度云っても云い過ぎる心配のないことでもあると思われる。――でこの意味に於て、批評は凡て印象批評であると云ってよく、所謂「印象批評」なるもののヒドラのような不屈振りも亦、ここに由来する。この点与えられ想定されている条件である。問題はいつもその先から発生する。ここから先が、初めて批評の問題になるのである。 | |
まず印象の追跡ということである。だが印象自身と印象の追跡ということとは、ハッキリ別のことではない。作品を読むという活動の意味にも色々あろうが、優秀な読者は二度も三度も同じ作品を読むだろう。若い時読んだものを年取ってから読み直すということはごく普通の現象だ。一遍読んですぐ又読み直すという人もいる。そうしないまでも、前へ戻りながら念を押して読むということは、誰でも必ずやっていることだ。途中でやめたり、飛ばして読んだり、新聞小説など逆に読んで行ったり(私はかつて偶然そういう機会を持ったが作家のかくされた制作過程を知るには大変いい参考になるようである)、そういうことは、散文などでは必ずしも乱暴な読み方とは云えないらしい。もし、随意に繰り返すことが出来るということが散文の特色だとすれば、こういう読み方にも意味があるだ |