質問編集履歴

1

Tracebackを追加しました

2021/07/24 17:41

投稿

tkrd
tkrd

スコア5

test CHANGED
File without changes
test CHANGED
@@ -2,6 +2,190 @@
2
2
 
3
3
 
4
4
 
5
+ ```Traceback
6
+
7
+ in <module>()
8
+
9
+ 27 decoder_layer = autoencoder.layers[-1]
10
+
11
+ 28 # encodeされた画像データを再構成する部分
12
+
13
+ ---> 29 decoder = Model(encoded_input, decoder_layer(encoded_input))
14
+
15
+ 30
16
+
17
+ 31 # AdaDeltaで最適化, loss関数はbinary_crossentropy
18
+
19
+
20
+
21
+ /usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/base_layer.py in __call__(self, *args, **kwargs)
22
+
23
+ 968 if _in_functional_construction_mode(self, inputs, args, kwargs, input_list):
24
+
25
+ 969 return self._functional_construction_call(inputs, args, kwargs,
26
+
27
+ --> 970 input_list)
28
+
29
+ 971
30
+
31
+ 972 # Maintains info about the `Layer.call` stack.
32
+
33
+
34
+
35
+ /usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/base_layer.py in _functional_construction_call(self, inputs, args, kwargs, input_list)
36
+
37
+ 1106 # Check input assumptions set after layer building, e.g. input shape.
38
+
39
+ 1107 outputs = self._keras_tensor_symbolic_call(
40
+
41
+ -> 1108 inputs, input_masks, args, kwargs)
42
+
43
+ 1109
44
+
45
+ 1110 if outputs is None:
46
+
47
+
48
+
49
+ /usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/base_layer.py in _keras_tensor_symbolic_call(self, inputs, input_masks, args, kwargs)
50
+
51
+ 838 return nest.map_structure(keras_tensor.KerasTensor, output_signature)
52
+
53
+ 839 else:
54
+
55
+ --> 840 return self._infer_output_signature(inputs, args, kwargs, input_masks)
56
+
57
+ 841
58
+
59
+ 842 def _infer_output_signature(self, inputs, args, kwargs, input_masks):
60
+
61
+
62
+
63
+ /usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/base_layer.py in _infer_output_signature(self, inputs, args, kwargs, input_masks)
64
+
65
+ 878 self._maybe_build(inputs)
66
+
67
+ 879 inputs = self._maybe_cast_inputs(inputs)
68
+
69
+ --> 880 outputs = call_fn(inputs, *args, **kwargs)
70
+
71
+ 881
72
+
73
+ 882 self._handle_activity_regularization(inputs, outputs)
74
+
75
+
76
+
77
+ /usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/layers/core.py in call(self, inputs)
78
+
79
+ 1240 self.kernel, ids, weights, combiner='sum')
80
+
81
+ 1241 else:
82
+
83
+ -> 1242 outputs = gen_math_ops.MatMul(a=inputs, b=self.kernel)
84
+
85
+ 1243 # Broadcast kernel to inputs.
86
+
87
+ 1244 else:
88
+
89
+
90
+
91
+ /usr/local/lib/python3.7/dist-packages/tensorflow/python/util/tf_export.py in wrapper(*args, **kwargs)
92
+
93
+ 402 'Please pass these args as kwargs instead.'
94
+
95
+ 403 .format(f=f.__name__, kwargs=f_argspec.args))
96
+
97
+ --> 404 return f(**kwargs)
98
+
99
+ 405
100
+
101
+ 406 return tf_decorator.make_decorator(f, wrapper, decorator_argspec=f_argspec)
102
+
103
+
104
+
105
+ /usr/local/lib/python3.7/dist-packages/tensorflow/python/ops/gen_math_ops.py in mat_mul(a, b, transpose_a, transpose_b, name)
106
+
107
+ 5716 _, _, _op, _outputs = _op_def_library._apply_op_helper(
108
+
109
+ 5717 "MatMul", a=a, b=b, transpose_a=transpose_a, transpose_b=transpose_b,
110
+
111
+ -> 5718 name=name)
112
+
113
+ 5719 _result = _outputs[:]
114
+
115
+ 5720 if _execute.must_record_gradient():
116
+
117
+
118
+
119
+ /usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/op_def_library.py in _apply_op_helper(op_type_name, name, **keywords)
120
+
121
+ 748 op = g._create_op_internal(op_type_name, inputs, dtypes=None,
122
+
123
+ 749 name=scope, input_types=input_types,
124
+
125
+ --> 750 attrs=attr_protos, op_def=op_def)
126
+
127
+ 751
128
+
129
+ 752 # `outputs` is returned as a separate return value so that the output
130
+
131
+
132
+
133
+ /usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/func_graph.py in _create_op_internal(self, op_type, inputs, dtypes, input_types, name, attrs, op_def, compute_device)
134
+
135
+ 599 return super(FuncGraph, self)._create_op_internal( # pylint: disable=protected-access
136
+
137
+ 600 op_type, captured_inputs, dtypes, input_types, name, attrs, op_def,
138
+
139
+ --> 601 compute_device)
140
+
141
+ 602
142
+
143
+ 603 def capture(self, tensor, name=None, shape=None):
144
+
145
+
146
+
147
+ /usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/ops.py in _create_op_internal(self, op_type, inputs, dtypes, input_types, name, attrs, op_def, compute_device)
148
+
149
+ 3563 input_types=input_types,
150
+
151
+ 3564 original_op=self._default_original_op,
152
+
153
+ -> 3565 op_def=op_def)
154
+
155
+ 3566 self._create_op_helper(ret, compute_device=compute_device)
156
+
157
+ 3567 return ret
158
+
159
+
160
+
161
+ /usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/ops.py in __init__(self, node_def, g, inputs, output_types, control_inputs, input_types, original_op, op_def)
162
+
163
+ 2040 op_def = self._graph._get_op_def(node_def.op)
164
+
165
+ 2041 self._c_op = _create_c_op(self._graph, node_def, inputs,
166
+
167
+ -> 2042 control_input_ops, op_def)
168
+
169
+ 2043 name = compat.as_str(node_def.name)
170
+
171
+ 2044
172
+
173
+
174
+
175
+ /usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/ops.py in _create_c_op(graph, node_def, inputs, control_inputs, op_def)
176
+
177
+ 1881 except errors.InvalidArgumentError as e:
178
+
179
+ 1882 # Convert to ValueError for backwards compatibility.
180
+
181
+ -> 1883 raise ValueError(str(e))
182
+
183
+ 1884
184
+
185
+ 1885 return c_op
186
+
187
+ ```
188
+
5
189
  ```Error
6
190
 
7
191
  ValueError: Dimensions must be equal, but are 32 and 128 for '{{node dense_5/MatMul}} = MatMul[T=DT_FLOAT, transpose_a=false, transpose_b=false](Placeholder, dense_5/MatMul/ReadVariableOp)' with input shapes: [?,32], [128,784].