とらりもんHOME  Index  Search  Changes  Login

とらりもん - keras Diff

  • Added parts are displayed like this.
  • Deleted parts are displayed like this.

[[https://keras.io/ja/]]

!classification
Here, "x" is the input data tensor (np.ndarray)
"model" is an instance of classifier, such as keras.models.Sequential.
* If you want the final class label only:
class = model.predict_class(x)
# The result "class" is a np.ndarray instance containing class labelslabel
* If you want probability (softmax) of all the candidate classes:
class_prob = model.predict(x)
# The result "class_preob" is a np.ndarray instance containing probability of each class

!
* keras.json for tensorflow
{
    "image_data_format": "channels_last",
    "epsilon": 1e-07,
    "floatx": "float32",
    "backend": "tensorflow"
}