回答編集履歴
2
誤字
answer
CHANGED
@@ -14,7 +14,6 @@
|
|
14
14
|
x_train, x_test = x_train / 255.0, x_test / 255.0
|
15
15
|
|
16
16
|
inp = layers.Input(shape=(28, 28))
|
17
|
-
print(inp)
|
18
17
|
x = layers.Flatten()(inp)
|
19
18
|
x = layers.Dense(128, activation='relu')(x)
|
20
19
|
x = layers.Dropout(0.5)(x)
|
1
情報の追加
answer
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
[参考ページ1:URL](https://qiita.com/cvusk/items/1439c1c6dde160c48d13)
|
2
2
|
[参考ページ2:URL](https://keras.io/guides/functional_api/#multi-input-and-multi-output-models)
|
3
|
-
上記のページを参考に解決致しました。ただし
|
3
|
+
動物の名前ではなくmnistでの記述ですが、上記のページを参考に解決致しました。ただし下記のコードでは与えたラベルがすべて同じなので意味のある結果にはなりませんが、四種類のアウトプットが可能です。
|
4
4
|
```python
|
5
5
|
import numpy as np
|
6
6
|
import tensorflow as tf
|