1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Floydhubでデータセットをアップロード

Last updated at Posted at 2017-11-07

Floydhub、GPUの無料使用分がなくなったのは残念ですが、Nvidia Tesla K80 GPUを1時間$0.7で使うことができます。Jupyterの場合ローカルでテストしててほぼそのままFloydhubで計算させられるので、AWS GPUインスタンスよりお手軽です。

画像データなどが多く含まれる場合は

Directory contains too many files to upload. If you have data files in the current directory, please upload them separately using "floyd data" command and remove them from here.

と言われるのでデータセットを別にアップロードします。

でデータセットを作成後

cd data 
floyd data init dataset-name
floyd data upload

でデータセットをアップロードします。

データセット名

user-name/datasets/dataset-name/1

データ名とデータパスを**--dataで指定して実行します [data-id]:**[path] でデータのパスを指定します。

floyd run --gpu --env tensorflow --data user-name/datasets/dataset-name/1:data  --mode jupyter

Jupter notebook内で利用できます。

train_iter = data_iterator.BatchIteratorSimple(batch_size=batch_size,
                                               data_folder=os.path.join('/', 'data', 'train'),
                                               image_shape=image_shape,
                                               shift_aug=True)

val_iter = data_iterator.BatchIteratorSimple(batch_size=batch_size,
                                             data_folder=os.path.join('//', 'data', 'validation'),
                                             image_shape=image_shape)
1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?