GithubHelp home page GithubHelp logo

amplify-hackathon's Introduction

amplify-hackathon

実行方法

アクセストークンについて

様々なファイルで使うのでローカルファイルから呼び出すようにしています。

~/.amplify/token.jsonに以下のjson形式で保存してください。

{
    "AMPLIFY_TOKEN": "YOUR TOKEN"
}

動作確認

全てDocker上で動かせます。 ターミナルで以下のコードを打ってトークンが存在するか確認してください。

docker-compose up check
# OK
Your token file exists.

# Bad (トークンファイルが見つからない)
Your token file doesn't exist.

Build

Dockerのビルドです。

docker-compose build

MNIST

docker-compose up run-mnist

MNISTの学習をします。
実行すると下のように進捗と結果を出力します。

run-mnist_1  | energy:  803.6696062499832
run-mnist_1  | time: 10.15 s
run-mnist_1  | energy:  803.2545875004947
run-mnist_1  | time: 13.138 s
run-mnist_1  | energy:  803.5983125001565
run-mnist_1  | time: 16.123 s
run-mnist_1  | energy:  803.4165125006213
run-mnist_1  | time: 19.112 s
run-mnist_1  | energy:  803.2492500003998
run-mnist_1  | time: 22.143 s
run-mnist_1  | ==================== 0 ====================
run-mnist_1  | AUC: 0.9766666666666667
run-mnist_1  | ACC: 0.9166666666666666
run-mnist_1  | ===========================================
run-mnist_1  | energy:  802.9704062497967
run-mnist_1  | time: 11.497 s
run-mnist_1  | energy:  803.410518749836
run-mnist_1  | time: 14.544 s
run-mnist_1  | energy:  803.4836625000177
run-mnist_1  | time: 17.529 s
run-mnist_1  | energy:  803.1810312498983
run-mnist_1  | time: 20.54 s
run-mnist_1  | energy:  803.1730187497739
run-mnist_1  | time: 23.525 s
run-mnist_1  | ==================== 1 ====================
run-mnist_1  | AUC: 0.9924888888888889
run-mnist_1  | ACC: 0.8166666666666667
run-mnist_1  | ===========================================
...

Fashion MNIST

docker-compose up run-fashion-mnist

EMNIST

docker-compose up run-emnist

otto

下に書いた方法でデータをダウンロードしてから

docker-compose up run-otto

データセットについて

MNIST

Digit Recognizer | Kaggle のデータセットを使っています。
これはMNISTのデータが扱いやすいcsv形式に変換されたものです。

  • train.csv: そのままのデータ
  • train_400.csv: 28x28(pixels)から20x20(pixels)に変換した後のデータ

train_400.csvの作成はsrc/resize.pyを用いました。

Fashion MNIST

Fashion MNIST | Kaggle のデータセットを使っています。 data/fashion_train_400.csvですが、作成方法は上と同じです。 元データは100MBを超えるのでGitHubにアップロードできませんでした。

EMNIST

EMNIST (Extended MNIST) のデータセットを使っています。

data/emnist_train_400.csvは上のデータセットのemnist-letters-test.csvをMNISTと同様に処理したものです。

Cohen, G., Afshar, S., Tapson, J., & van Schaik, A. (2017). EMNIST: an extension of MNIST to handwritten letters. Retrieved from http://arxiv.org/abs/1702.05373

otto

Otto Group Product Classification Challenge というKaggleのコンペのデータです。
入力は93個の特徴量、出力は9クラスの多クラス分類のタスクです。

このリンクの先で Kaggleにログインし、Join Competition を押してから下の画面のtrain.csvをダウンロードしてください。

ダウンロードしたファイルを解凍したら、train.csvをこのディレクトリのdata/otto-train.csv に移動することでデータが利用できます。

エラーについて

たまに学習時、以下のようなエラーが発生します。原因はよくわかってないので、実行し直す、分割して実行するなどして対処してください。

サーバーが高負荷になるのが原因のようです。何度か再実行すれば上手くいくはずです。

RuntimeError: Incorrect Content-Type: must be textual to extract_string, JSON to extract_json.
RuntimeError: 502 Bad Gateway
RuntimeError: Failed to read HTTP status line

提出前チェック

  • README.mdの手順通りにして、プログラムが実行できる
  • 説明用スライドを用意した
  • アクセストークンはリポジトリに含まれていない
  • MIT Licenseにした

amplify-hackathon's People

Contributors

chizuchizu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.