質問するログイン新規登録

質問編集履歴

1

input_shapeを入れるのを忘れていたので修正と、model.summary()の結果の追加

2020/05/10 12:10

投稿

AIthon
AIthon

スコア76

title CHANGED
File without changes
body CHANGED
@@ -13,7 +13,7 @@
13
13
  ```python
14
14
  model = Sequential()
15
15
 
16
- model.add(Dense(3000, activation='sigmoid'))
16
+ model.add(Dense(3000, activation='sigmoid', input_shape=(30000,)))
17
17
 
18
18
  model.add(Dense(1000, activation='sigmoid'))
19
19
  model.add(Dense(500, activation='sigmoid'))
@@ -23,6 +23,28 @@
23
23
 
24
24
  model.compile(loss='mean_squared_error', optimizer=Adam(lr=1e-3), metrics=['accuracy'])
25
25
  ```
26
+ **model.summary()の結果**
27
+ ```python
28
+ Model: "sequential_1"
29
+ _________________________________________________________________
30
+ Layer (type) Output Shape Param #
31
+ =================================================================
32
+ dense_1 (Dense) (None, 30000) 900030000
33
+ _________________________________________________________________
34
+ dense_2 (Dense) (None, 1000) 30001000
35
+ _________________________________________________________________
36
+ dense_3 (Dense) (None, 500) 500500
37
+ _________________________________________________________________
38
+ dense_4 (Dense) (None, 250) 125250
39
+ _________________________________________________________________
40
+ dense_5 (Dense) (None, 21) 5271
41
+ =================================================================
42
+ Total params: 930,662,021
43
+ Trainable params: 930,662,021
44
+ Non-trainable params: 0
45
+ _________________________________________________________________
46
+
47
+ ```
26
48
  **パソコン上のメモリ**・・・8GB(使用可能なのは実質5GB位)
27
49
 
28
50
  **プロセスがキルされたときのログ**