Breta Hajek

All my activities in one place–mostly dev stuff.

bretahajek.com

Tag: Quick Fix

Using Combined Adversarial Loss in TensorFlow GANEstimator

This will be a quick tip on how to use combine_adversarial_loss in tf.contrib.gan.estimator.GANEstimator. In my latest projects, I have been using TensorFlow estimators. Estimators allow you to focus more on creating models and wraps the whole training (including saving, exporting, and putting a model in production) into few lines. Recently, I experienced the limits of estimators when I wanted to train a generative adversarial network (GAN) with a combined adversarial loss. In this article, I will show you a little trick how to do that.

TF tricks #1 Using GANs

Read More

Quick Fix: No DISPLAY Variable while using Matplotlib on Android

A few weeks after releasing my tutorial for installing Jupyter Notebook on Android, I ran into this issue of Matplotlib: TclError: no display name and $DISPLAY environment variable, whenever I tried to use it in Jupyter Notebook on Android. This problem got me puzzled for a while because I knew it used to work when I was writing the tutorial. Luckily, there is a one-line fix for this issue. So, in case you don’t have time for any other details, just put this line at the beginning of the notebook:

%matplotlib inline

Matplotlib no display ERROR on Android

Check the example, it works!

Read More

Břetislav Hájek © 2015-2019