Deep LearningTensorflowのif文でusing a `tf.Tensor` as a Python `bool` is not allowed: tf.kerasでcustom layerを書いていた時、ある確率でランダムに水増しを行う関数を書いていた。model.fitを実行した際に表題のエラーが発生。OperatorNotAllowedInGraphError: using a ...2021.09.09Deep Learning
Deep Learningkeras.layers.GaussianNoiseでノイズが追加されない Jupyter Notebookでkeras.layers.GaussianNoiseを使ってみた所、なんのnoiseも付与されなかったので調べてみた。まずは公式ドキュメント。Call arguments:inputs: Input ten...2021.09.07Deep Learning
PythonRaspberry piのI2CでOSError: [Errno 121] Remote I/O error Raspberry piにI2Cのセンサーを繋ぎ、smbus2でデータの取得を試みたところ表題のエラー。File "/usr/local/lib/python3.7/dist-packages/smbus2/smbus2.py", lin...2021.09.032021.09.07Python
Deep Learning回帰分析でStratifiedKFoldの交差検証を行う 機械学習を行う際、交差検証(Cross Validation, CV)に基づいてモデルの良し悪しを判断することが多い。クラス分類であればStratifiedKFoldがそのまま使えるが、回帰の場合は工夫が必要になる。以下の本を参考に、ビニン...2021.09.01Deep Learning