質問編集履歴
1
エラーメッセージを全文掲載しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -50,7 +50,89 @@
|
|
50
50
|
|
51
51
|
```
|
52
52
|
|
53
|
+
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/func_graph.py in wrapper(*args, **kwargs)
|
54
|
+
|
55
|
+
971 except Exception as e: # pylint:disable=broad-except
|
56
|
+
|
57
|
+
972 if hasattr(e, "ag_error_metadata"):
|
58
|
+
|
59
|
+
--> 973 raise e.ag_error_metadata.to_exception(e)
|
60
|
+
|
61
|
+
974 else:
|
62
|
+
|
63
|
+
975 raise
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
ValueError: in user code:
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:806 train_function *
|
72
|
+
|
73
|
+
return step_function(self, iterator)
|
74
|
+
|
75
|
+
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:796 step_function **
|
76
|
+
|
77
|
+
outputs = model.distribute_strategy.run(run_step, args=(data,))
|
78
|
+
|
79
|
+
/usr/local/lib/python3.6/dist-packages/tensorflow/python/distribute/distribute_lib.py:1211 run
|
80
|
+
|
81
|
+
return self._extended.call_for_each_replica(fn, args=args, kwargs=kwargs)
|
82
|
+
|
83
|
+
/usr/local/lib/python3.6/dist-packages/tensorflow/python/distribute/distribute_lib.py:2585 call_for_each_replica
|
84
|
+
|
85
|
+
return self._call_for_each_replica(fn, args, kwargs)
|
86
|
+
|
87
|
+
/usr/local/lib/python3.6/dist-packages/tensorflow/python/distribute/distribute_lib.py:2945 _call_for_each_replica
|
88
|
+
|
89
|
+
return fn(*args, **kwargs)
|
90
|
+
|
91
|
+
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:789 run_step **
|
92
|
+
|
93
|
+
outputs = model.train_step(data)
|
94
|
+
|
95
|
+
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:749 train_step
|
96
|
+
|
97
|
+
y, y_pred, sample_weight, regularization_losses=self.losses)
|
98
|
+
|
99
|
+
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/compile_utils.py:204 __call__
|
100
|
+
|
101
|
+
loss_value = loss_obj(y_t, y_p, sample_weight=sw)
|
102
|
+
|
103
|
+
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/losses.py:149 __call__
|
104
|
+
|
105
|
+
losses = ag_call(y_true, y_pred)
|
106
|
+
|
107
|
+
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/losses.py:253 call **
|
108
|
+
|
109
|
+
return ag_fn(y_true, y_pred, **self._fn_kwargs)
|
110
|
+
|
111
|
+
/usr/local/lib/python3.6/dist-packages/tensorflow/python/util/dispatch.py:201 wrapper
|
112
|
+
|
113
|
+
return target(*args, **kwargs)
|
114
|
+
|
115
|
+
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/losses.py:1535 categorical_crossentropy
|
116
|
+
|
117
|
+
return K.categorical_crossentropy(y_true, y_pred, from_logits=from_logits)
|
118
|
+
|
119
|
+
/usr/local/lib/python3.6/dist-packages/tensorflow/python/util/dispatch.py:201 wrapper
|
120
|
+
|
121
|
+
return target(*args, **kwargs)
|
122
|
+
|
123
|
+
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/backend.py:4687 categorical_crossentropy
|
124
|
+
|
125
|
+
target.shape.assert_is_compatible_with(output.shape)
|
126
|
+
|
127
|
+
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/tensor_shape.py:1134 assert_is_compatible_with
|
128
|
+
|
129
|
+
raise ValueError("Shapes %s and %s are incompatible" % (self, other))
|
130
|
+
|
131
|
+
|
132
|
+
|
53
133
|
ValueError: Shapes (None, 1) and (None, 10) are incompatible
|
134
|
+
|
135
|
+
|
54
136
|
|
55
137
|
```
|
56
138
|
|