予想通り不合理 -FXと機械学習と-

FXの自動売買や機械学習、その他勉強したことをシェアします

Kaggle -Google Cloud & YouTube-8M Video Understanding Challenge- まずは登録②

kapiparaです。

前回の続きです。

 

4. Connect to and Run the Starter Code

    • We have created starter code in github that you can run in Cloud ML as a starting point to learn how to train, evaluate, and create predictions.
    • Cloud MLを動かして学習・評価・予想ができるスターターコードをgithubに置いといた。
    • In your cloud shell, type the following into the command line to clone the YouTube-8M github repo:
    • githubからクローンするためにとりあえず下のコマンドを打ってみよう。
git clone https://github.com/google/youtube-8m.git
  • Go to the github repo README and follow the starter code instructions hereafter until you have completed the training, evaluation & inference steps. Each command line creates a job in Cloud ML, and its progress can be followed in the cloud shell console to give you a sense for how the model is converging. Then return back to this tutorial to generate a predictions file for submission, explained in Step 6 below.
  • githubのREADMEを読んで勉強して帰ってきたらStep6よりあとやってSubmission用の予想ファイルを作成しよう。
  • We also provide some helpful tips below, to refer to as you are running through the starter code.
  • スターターコードを走らせる時用のtipsもあるから見てね。

READMEの内容

①tensorflow 1.0.0以上かつpython2.7以上が必要

②コマンド叩いてディレクトリを作成して小さいサイズ(ビデオレベル)のYoutube-8M deta setをとりあえずDL(mirror=Asiaにするのを忘れずに。)

ついでにvalidate,testもDL。

③コマンドを叩いて学習を実施。

④デフォルト設定だと--train_dirにcheckpointを出力してしまうので、トライ&エラーをしているフェーズにおいては、--start_new_modelの引数渡してcheckpointを無視する設定にするの推奨。

⑤モデルの評価を実行。

⑥Tensorboardを確認。

⑦いい感じだったらinferenceコマンドを実行してpredictions.csvを作成。

5. Download your Predictions File to make a Kaggle Submission

上でStep6って書いてあるけど思いっきり5のこと。すったもんだの末の誤植か。。

  • Running the inference command in the Starter Code (Step 5 above) generates a predictions file (predictions.csv). A gs:// link should be given to you when your inference job is finished. You can find this at the end of the log for your inference job by following the instructions under Job Logs, below. View the log to find the gs:// link by clicking on "View Logs" for the job.
  • inferenceコマンドを叩けばpredictions.csvがどっかにできるので、ジョブログを確認しよう。ジョブログからgs:// link見つけてgsutilでダウンロードしよう。
  • Download your predictions.csv file to your local computer.
      • Option 1: You can download it via gsutil:
    gsutil cp gs://{your bucket}/{your model}/predictions.csv .
  • Option 2: You can also download via the Google Cloud Console. Minimize Cloud Shell & navigate to the Console's upper-left drop down menu, go to "Storage" (about midway down the menu). Select the bucket and navigate to the folder where you have saved the predictions.csv file in the steps above.
  • Google Cloud Consoleを使ってダウンロードする方法もあるよ。

 

まで読んだが、ファイルのDLが思いのほか長いのでevaluationから今度実行する。

 

以上。