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

質問編集履歴

5

題名変更

2018/11/15 11:15

投稿

FALLOT
FALLOT

スコア16

title CHANGED
@@ -1,1 +1,1 @@
1
- kerasでCNNをはじめてやる画像認識(入力層)
1
+ kerasでCNNをはじめてやる画像認識(入力層の4次元テンソルなのに3次元のまま どうすれば追加可能か
body CHANGED
File without changes

4

質問内容の変更

2018/11/15 11:15

投稿

FALLOT
FALLOT

スコア16

title CHANGED
File without changes
body CHANGED
@@ -81,7 +81,7 @@
81
81
  image = np.array(Image.open(filepath).resize((x, y)))
82
82
  print(image.shape)
83
83
  print(filepath)
84
- image =np.reshape(image, A)
84
+ #image =np.reshape(image, A)
85
85
  print(image.shape)
86
86
  print('\n')
87
87
  image_list.append(image / 255.)

3

質問内容の変更

2018/11/15 10:47

投稿

FALLOT
FALLOT

スコア16

title CHANGED
File without changes
body CHANGED
@@ -9,6 +9,9 @@
9
9
 
10
10
  おそらく,
11
11
  data_format: 文字列で,"channels_last"(デフォルト)"(batch, height, width, channels)"
12
+ TensorFlowでは(サンプル数, 画像の行数, 画像の列数, チャネル数)
13
+ バックエンドでTFを使っています.
14
+
12
15
  という形なので,ミニバッチを付け足せばいいと思うのですがどうすればよいですか?
13
16
 
14
17
  ```python

2

質問内容の変更

2018/11/15 10:47

投稿

FALLOT
FALLOT

スコア16

title CHANGED
@@ -1,1 +1,1 @@
1
- kerasでCNNをはじめてやる画像認識
1
+ kerasでCNNをはじめてやる画像認識(入力層)
body CHANGED
@@ -5,10 +5,12 @@
5
5
  白丸が横方向に移動して内部の最大応力が発生した箇所を白丸ごとにラベリングしました.
6
6
  MLPでは経験者なのですが,CNNは初心者なので何がなんだかわかんない状況です.以下のエラーが出ておりどこを修正すればいいのかご教授願います.
7
7
 
8
+ ValueError: Error when checking input: expected conv2d_1_input to have 4 dimensions, but got array with shape (4000, 90, 90)
8
9
 
10
+ おそらく,
9
- ValueError: Error when checking input: expected conv2d_1_input to have 4 dimensions, but got array with shape (4000, 8100)
11
+ data_format: 文字列で,"channels_last"(デフォルト)"(batch, height, width, channels)"
12
+ という形なので,ミニバッチを付け足せばいいと思うのですがどうすればよいですか?
10
13
 
11
-
12
14
  ```python
13
15
 
14
16
 

1

画像データの説明

2018/11/15 08:39

投稿

FALLOT
FALLOT

スコア16

title CHANGED
File without changes
body CHANGED
@@ -1,8 +1,11 @@
1
1
  ![イメージ説明](b95487102371246e4736b4aaa6663f67.png)
2
2
 
3
+ 画像データはグレースケールにして二値化しています.
4
+
3
5
  白丸が横方向に移動して内部の最大応力が発生した箇所を白丸ごとにラベリングしました.
4
6
  MLPでは経験者なのですが,CNNは初心者なので何がなんだかわかんない状況です.以下のエラーが出ておりどこを修正すればいいのかご教授願います.
5
7
 
8
+
6
9
  ValueError: Error when checking input: expected conv2d_1_input to have 4 dimensions, but got array with shape (4000, 8100)
7
10
 
8
11