質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Google Cloud Platform

Google Cloud Platformは、Google社がクラウド上で提供しているサービス郡の総称です。エンドユーザー向けサービスと同様のインフラストラクチャーで運営されており、Webサイト開発から複雑なアプリ開発まで対応可能です。

Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

Windows

Windowsは、マイクロソフト社が開発したオペレーティングシステムです。当初は、MS-DOSに変わるOSとして開発されました。 GUIを採用し、主にインテル系のCPUを搭載したコンピューターで動作します。Windows系OSのシェアは、90%を超えるといわれています。 パソコン用以外に、POSシステムやスマートフォンなどの携帯端末用、サーバ用のOSもあります。

Q&A

1回答

1452閲覧

if i run tensorflow on my machine or google codelab , why both are different

AliHassan

総合スコア351

Google Cloud Platform

Google Cloud Platformは、Google社がクラウド上で提供しているサービス郡の総称です。エンドユーザー向けサービスと同様のインフラストラクチャーで運営されており、Webサイト開発から複雑なアプリ開発まで対応可能です。

Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

Windows

Windowsは、マイクロソフト社が開発したオペレーティングシステムです。当初は、MS-DOSに変わるOSとして開発されました。 GUIを採用し、主にインテル系のCPUを搭載したコンピューターで動作します。Windows系OSのシェアは、90%を超えるといわれています。 パソコン用以外に、POSシステムやスマートフォンなどの携帯端末用、サーバ用のOSもあります。

2グッド

0クリップ

投稿2018/06/23 08:01

Training works best if the examples are in random order. Use tf.data.Dataset.shuffle to randomize entries, setting buffer_size to a value larger than the number of examples (120 in this case). To train the model faster, the dataset's batch size is set to 32 examples to train at once. train_dataset = tf.data.TextLineDataset(train_dataset_fp) train_dataset = train_dataset.skip(1) # skip the first header row train_dataset = train_dataset.map(parse_csv) # parse each row train_dataset = train_dataset.shuffle(buffer_size=1000) # randomize train_dataset = train_dataset.batch(32)
features, label = iter(train_dataset).next() >>> print("example features:", features[0]) example features: tf.Tensor([5.1 3.7 1.5 0.4], shape=(4,), dtype=float32) >>> print("example label:", label[0]) example label: tf.Tensor(0, shape=(), dtype=int32)

tensorflow output

example features: tf.Tensor([6. 2.7 5.1 1.6], shape=(4,), dtype=float32) example label: tf.Tensor(1, shape=(), dtype=int32)
afroscript, umyu👍を押しています

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

YouheiSakurai

2018/06/23 09:35

What’s your problem? You mean some code working on google codelab but not on your machine, don’t you?
AliHassan

2018/06/23 14:42

no , both are running but results little different from one and another
AliHassan

2018/06/23 15:08

GOOGLE CODLAB P TENSORFLOW 1.9 RC PRODUCE 98% TRAINING and 97% test . While my machine produce 70% for training and 53% test
YouheiSakurai

2018/06/24 04:37 編集

Garbage question-in, garbage (or no) answer-out. Describe your question once again carefully if you want to hear something different from my “don’t know”. Your question sounds like worse than students’.
YouheiSakurai

2018/06/24 04:38 編集

Clues (and contexts) are basically missing in your question, that enables others to identify by what, for what, how and so on you are blocked. If you don’t have idea of how to do it, please let me know so and I will give you guidance.
AliHassan

2018/06/24 11:32

let suppose we have two machines , machine a produce 97% results and machine b produce 96% for same example . reason why these results are little different from one and another
YouheiSakurai

2018/06/24 18:42 編集

Difference makes difference. Also, randomness should be considered if everything looks the same.
guest

回答1

0

The results should differ even with the same machine if you do not fix the random seed.
If you are using tensorflow on the colab with GPU, you might not be able to fix the seed.

https://github.com/tensorflow/tensorflow/issues/2732

Did cross validate your model to comfirm the variance?

投稿2018/06/24 22:51

編集2018/06/24 22:54
mkgrei

総合スコア8560

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

YouheiSakurai

2018/06/25 16:55

Should? I supposed “may differ” depending on how complex the cost function is. (Don’t take this comment wrongly, I am just curious to know it precisely and exactly.)
YouheiSakurai

2018/06/26 00:13 編集

Ah, question was asking why first items of features and labels are different (between machines). Thanks, agree. That should differ.
AliHassan

2018/06/26 08:34 編集

okay thanks , i randomly assigned batch number , but this issue resolved. thank you for help
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問