<p dir="auto">Thank you for the amazing work.</p>
<p dir="auto">I am using Tensorboard to visualize my training, and it works just fine.</p>
<p dir="auto">But when I need to change the frequency of loss scalers, I can't find api to do this. I want to more scalers log, maybe log end of every batch. Now I can only get one log during an epoch. Thanks a lot.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="tensorboard_callback = TensorBoard(log_dir = log_dir,
    histogram_freq = 1,
    write_graph = True,
    write_images = False,
    embeddings_freq = embeddings_freq,
    embeddings_layer_names = None,
    embeddings_metadata = &quot;w2v_metadata.tsv&quot;)"><pre class="notranslate"><code class="notranslate">tensorboard_callback = TensorBoard(log_dir = log_dir,
    histogram_freq = 1,
    write_graph = True,
    write_images = False,
    embeddings_freq = embeddings_freq,
    embeddings_layer_names = None,
    embeddings_metadata = "w2v_metadata.tsv")
</code></pre></div>
<ul class="contains-task-list">
<li>
<p dir="auto">[x ] Check that you are up-to-date with the master branch of Keras. You can update with:<br>
pip install git+git://github.com/fchollet/keras.git --upgrade --no-deps</p>
</li>
<li>
<p dir="auto">[x ] If running on TensorFlow, check that you are up-to-date with the latest version. The installation instructions can be found <a href="https://www.tensorflow.org/get_started/os_setup" rel="nofollow">here</a>.</p>
</li>
<li class="task-list-item">
<p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> If running on Theano, check that you are up-to-date with the master branch of Theano. You can update with:<br>
pip install git+git://github.com/Theano/Theano.git --upgrade --no-deps</p>
</li>
<li class="task-list-item">
<p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Provide a link to a GitHub Gist of a Python script that can reproduce your issue (or just copy the script here if it is short).</p>
</li>
</ul>
<p dir="auto">Please make sure that the boxes below are checked before you submit your issue. If your issue is an implementation question, please ask your question on <a href="http://stackoverflow.com/questions/tagged/keras" rel="nofollow">StackOverflow</a> or <a href="https://keras-slack-autojoin.herokuapp.com/" rel="nofollow">join the Keras Slack channel</a> and ask there instead of filing a GitHub issue.</p>
<p dir="auto">Thank you!</p>
<ul class="contains-task-list">
<li class="task-list-item">
<p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Check that you are up-to-date with the master branch of Keras. You can update with:<br>
pip install git+git://github.com/fchollet/keras.git --upgrade --no-deps</p>
</li>
<li class="task-list-item">
<p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> If running on Theano, check that you are up-to-date with the master branch of Theano. You can update with:<br>
pip install git+git://github.com/Theano/Theano.git --upgrade --no-deps</p>
</li>
<li class="task-list-item">
<p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Provide a link to a GitHub Gist of a Python script that can reproduce your issue (or just copy the script here if it is short).</p>
</li>
</ul>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from keras.layers.wrappers import Bidirectional
from keras.layers import LSTM, Dense, Input
from keras.models import Model
import numpy as np
data=np.random.rand(1,5,10)
label=np.asarray([[1,0,0]])

inp = Input(shape=data.shape[1:])
x = Bidirectional(LSTM(units=32,recurrent_dropout=0.5))(inp)
x = Dense(3,activation='softmax')(x)
model = Model(input=inp, output=x)
model.compile(loss='binary_crossentropy',
              optimizer='adam',
              metrics=['accuracy'])
model.fit(data, label, epochs=1)"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">keras</span>.<span class="pl-s1">layers</span>.<span class="pl-s1">wrappers</span> <span class="pl-k">import</span> <span class="pl-v">Bidirectional</span>
<span class="pl-k">from</span> <span class="pl-s1">keras</span>.<span class="pl-s1">layers</span> <span class="pl-k">import</span> <span class="pl-v">LSTM</span>, <span class="pl-v">Dense</span>, <span class="pl-v">Input</span>
<span class="pl-k">from</span> <span class="pl-s1">keras</span>.<span class="pl-s1">models</span> <span class="pl-k">import</span> <span class="pl-v">Model</span>
<span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-s1">data</span><span class="pl-c1">=</span><span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">rand</span>(<span class="pl-c1">1</span>,<span class="pl-c1">5</span>,<span class="pl-c1">10</span>)
<span class="pl-s1">label</span><span class="pl-c1">=</span><span class="pl-s1">np</span>.<span class="pl-en">asarray</span>([[<span class="pl-c1">1</span>,<span class="pl-c1">0</span>,<span class="pl-c1">0</span>]])

<span class="pl-s1">inp</span> <span class="pl-c1">=</span> <span class="pl-v">Input</span>(<span class="pl-s1">shape</span><span class="pl-c1">=</span><span class="pl-s1">data</span>.<span class="pl-s1">shape</span>[<span class="pl-c1">1</span>:])
<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-v">Bidirectional</span>(<span class="pl-v">LSTM</span>(<span class="pl-s1">units</span><span class="pl-c1">=</span><span class="pl-c1">32</span>,<span class="pl-s1">recurrent_dropout</span><span class="pl-c1">=</span><span class="pl-c1">0.5</span>))(<span class="pl-s1">inp</span>)
<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-v">Dense</span>(<span class="pl-c1">3</span>,<span class="pl-s1">activation</span><span class="pl-c1">=</span><span class="pl-s">'softmax'</span>)(<span class="pl-s1">x</span>)
<span class="pl-s1">model</span> <span class="pl-c1">=</span> <span class="pl-v">Model</span>(<span class="pl-s1">input</span><span class="pl-c1">=</span><span class="pl-s1">inp</span>, <span class="pl-s1">output</span><span class="pl-c1">=</span><span class="pl-s1">x</span>)
<span class="pl-s1">model</span>.<span class="pl-en">compile</span>(<span class="pl-s1">loss</span><span class="pl-c1">=</span><span class="pl-s">'binary_crossentropy'</span>,
              <span class="pl-s1">optimizer</span><span class="pl-c1">=</span><span class="pl-s">'adam'</span>,
              <span class="pl-s1">metrics</span><span class="pl-c1">=</span>[<span class="pl-s">'accuracy'</span>])
<span class="pl-s1">model</span>.<span class="pl-en">fit</span>(<span class="pl-s1">data</span>, <span class="pl-s1">label</span>, <span class="pl-s1">epochs</span><span class="pl-c1">=</span><span class="pl-c1">1</span>)</pre></div>
<p dir="auto">Above code gives the following error, If I remove <code class="notranslate">recurrent_dropout=0.5</code> it trains without error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="MissingInputError: Input 0 of the graph (indices start from 0), used to compute if{}(keras_learning_phase, Elemwise{true_div,no_inplace}.0, Reshape{2}.0), was not provided and not given a value. Use the Theano flag exception_verbosity='high', for more information on this error.
 
Backtrace when that variable is created:

  File &quot;&lt;ipython-input-1-aa27b7e1da0a&gt;&quot;, line 1, in &lt;module&gt;
    runfile('/home/bozkurt.a/DEJ/train_lstm_seq.py', wdir='/home/bozkurt.a/DEJ')
  File &quot;/home/bozkurt.a/miniconda2/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py&quot;, line 866, in runfile
    execfile(filename, namespace)
  File &quot;/home/bozkurt.a/miniconda2/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py&quot;, line 94, in execfile
    builtins.execfile(filename, *where)
  File &quot;/home/bozkurt.a/DEJ/train_lstm_seq.py&quot;, line 11, in &lt;module&gt;
    from keras.models import Model
  File &quot;/home/bozkurt.a/miniconda2/lib/python2.7/site-packages/Keras-2.0.2-py2.7.egg/keras/__init__.py&quot;, line 3, in &lt;module&gt;
    from . import activations
  File &quot;/home/bozkurt.a/miniconda2/lib/python2.7/site-packages/Keras-2.0.2-py2.7.egg/keras/activations.py&quot;, line 3, in &lt;module&gt;
    from . import backend as K
  File &quot;/home/bozkurt.a/miniconda2/lib/python2.7/site-packages/Keras-2.0.2-py2.7.egg/keras/backend/__init__.py&quot;, line 61, in &lt;module&gt;
    from .theano_backend import *
  File &quot;/home/bozkurt.a/miniconda2/lib/python2.7/site-packages/Keras-2.0.2-py2.7.egg/keras/backend/theano_backend.py&quot;, line 28, in &lt;module&gt;
    _LEARNING_PHASE = T.scalar(dtype='uint8', name='keras_learning_phase')  # 0 = test, 1 = train"><pre class="notranslate"><code class="notranslate">MissingInputError: Input 0 of the graph (indices start from 0), used to compute if{}(keras_learning_phase, Elemwise{true_div,no_inplace}.0, Reshape{2}.0), was not provided and not given a value. Use the Theano flag exception_verbosity='high', for more information on this error.
 
Backtrace when that variable is created:

  File "&lt;ipython-input-1-aa27b7e1da0a&gt;", line 1, in &lt;module&gt;
    runfile('/home/bozkurt.a/DEJ/train_lstm_seq.py', wdir='/home/bozkurt.a/DEJ')
  File "/home/bozkurt.a/miniconda2/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 866, in runfile
    execfile(filename, namespace)
  File "/home/bozkurt.a/miniconda2/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 94, in execfile
    builtins.execfile(filename, *where)
  File "/home/bozkurt.a/DEJ/train_lstm_seq.py", line 11, in &lt;module&gt;
    from keras.models import Model
  File "/home/bozkurt.a/miniconda2/lib/python2.7/site-packages/Keras-2.0.2-py2.7.egg/keras/__init__.py", line 3, in &lt;module&gt;
    from . import activations
  File "/home/bozkurt.a/miniconda2/lib/python2.7/site-packages/Keras-2.0.2-py2.7.egg/keras/activations.py", line 3, in &lt;module&gt;
    from . import backend as K
  File "/home/bozkurt.a/miniconda2/lib/python2.7/site-packages/Keras-2.0.2-py2.7.egg/keras/backend/__init__.py", line 61, in &lt;module&gt;
    from .theano_backend import *
  File "/home/bozkurt.a/miniconda2/lib/python2.7/site-packages/Keras-2.0.2-py2.7.egg/keras/backend/theano_backend.py", line 28, in &lt;module&gt;
    _LEARNING_PHASE = T.scalar(dtype='uint8', name='keras_learning_phase')  # 0 = test, 1 = train
</code></pre></div>