deep learning
how to manually write to tensorboard from tf.keras callback (useful trick when writing a handful of validation metrics at once)
tf.keras does support Metric classes which can evaludate metrics at each batch. However, it does have a limitation that it can only calculat on training data and it can only output only one value. This becomes a problem especially in cases such as when the user does validation evaluation and Read more…
tensorflow
tf.where examples and its behavior
Before going into tf.where example, a proper way to implement equal comparison in tensorflow will be demonstrated since equal comparison will be used as the condition of the tf.where. Equal Comparison in Tensorflow output: to fix this, do not use python native operands such as == in the above. instead Read more…
deep learning
strictly match cuda version when installing cudnn
I was naive to think that a cudnn version built for CUDA 10.1 will work with CUDA 10.0 installed in my machine. This mismatch will not produce any explicit error messages when building and training a tensorflow model. However, I notices that the loss does not reduce even after a Read more…
python
json dumping(serializing) custom python classes
One of the greatest features of Python is that native types are naturally JSON serializable which makes it exporting/importing json files so easy and convenient without any hassle. However, once the user starts to create their own classes and confronts the situation to dump them as a part of a Read more…