Do not use learning_phase anymore, just set training=True/False
parent
df100ffa9a
commit
107b90d9b3
|
@ -1828,8 +1828,7 @@
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"#with keras.backend.learning_phase_scope(1): # TODO: check https://github.com/tensorflow/tensorflow/issues/25754\n",
|
"history = model.fit(X_train_scaled, y_train)"
|
||||||
"# history = model.fit(X_train_scaled, y_train)"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -1855,8 +1854,8 @@
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"with keras.backend.learning_phase_scope(1): # TODO: check https://github.com/tensorflow/tensorflow/issues/25754\n",
|
"y_probas = np.stack([model(X_test_scaled, training=True)\n",
|
||||||
" y_probas = np.stack([model.predict(X_test_scaled) for sample in range(100)])\n",
|
" for sample in range(100)])\n",
|
||||||
"y_proba = y_probas.mean(axis=0)\n",
|
"y_proba = y_probas.mean(axis=0)\n",
|
||||||
"y_std = y_probas.std(axis=0)"
|
"y_std = y_probas.std(axis=0)"
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue