Not sure what you mean by “full Keras backend”. Keras is a neural network library on top of TensorFlow. The primary features it adds relevant to Edward are functions to compose neural net layers. You can use NumPy arrays for most heavy lifting in Edward (we do so in many examples). However, if you’d like to build nodes in your computational graph that are not fed until runtime, you need to use TensorFlow placeholders as there is no “Keras equivalent”.
As you know, keras has its own backend containing placeholder, variable, etc…
I meant that whether we can, for example, replace tf.placeholder with keras.backend.placeholder.
In general, can we utilize keras backend and its methods instead of tf methods?
I tried this example by fully keras methods and functions.
Ihttp://edwardlib.org/tutorials/supervised-regression
However, I have no idea when I should set learning phase in keras when using it in edward.
Oh, that backend. I guess you can. It just wraps TensorFlow ops so it should work fine.
Just as with standard TensorFlow placeholders, you need to feed the learning phase during training time (calls to inference.update()) and prediction time.
Thank Dustin,
Of course, it’s not just simple wrapper; it has own methods to construct random variables, zero and ones vectors, etc. Everything works well though by using keras backend.
You mean inference.update() has argument to set learning phase?
I would be thankful if you could add or mention an example in the repo describing how to set it. It’s very urgent and crucial for my research.