<h3 dir="auto">System information</h3>
<ul dir="auto">
<li><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>:<br>
Yes, duplicated the minimal code from documentation snippet <a href="https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/distribute#example-with-keras-api">here</a></li>
</ul>
<p dir="auto">But the included <a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/distribute/python/examples/keras_mnist.py">keras_mnist.py</a> example is broken as well.</p>
<ul dir="auto">
<li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>:<br>
Docker container <code class="notranslate">tensorflow/tensorflow:1.11.0-rc2-gpu-py3</code></li>
<li><strong>Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device</strong>:</li>
<li><strong>TensorFlow installed from (source or binary)</strong>:</li>
<li><strong>TensorFlow version (use command below)</strong>:</li>
<li><strong>Python version</strong>:</li>
<li><strong>Bazel version (if compiling from source)</strong>:</li>
<li><strong>GCC/Compiler version (if compiling from source)</strong>:</li>
<li><strong>CUDA/cuDNN version</strong>:</li>
<li><strong>GPU model and memory</strong>:<br>
2 x 1080ti</li>
<li><strong>Exact command to reproduce</strong>:</li>
</ul>
<h3 dir="auto">Describe the problem</h3>
<p dir="auto"><a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/distribute/python/examples/keras_mnist.py">keras_mnist.py</a> example seems to break. Investigating further...</p>
<p dir="auto">Optimizers other than <code class="notranslate">tf.train.GradientDescentOptimizer</code> are not working with <code class="notranslate">MirroredStrategy</code> for Keras models as shown in this official <a href="https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/distribute#example-with-keras-api">example</a></p>
<h3 dir="auto">Source code / logs</h3>
<p dir="auto"><strong>Setup</strong>, copied from the <a href="https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/distribute#example-with-keras-api">example</a>:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="inputs = tf.keras.layers.Input(shape=(1,))
predictions = tf.keras.layers.Dense(1)(inputs)
model = tf.keras.models.Model(inputs=inputs, outputs=predictions)

features = tf.data.Dataset.from_tensors([1.]).repeat(10000).batch(10)
labels = tf.data.Dataset.from_tensors([1.]).repeat(10000).batch(10)
train_dataset = tf.data.Dataset.zip((features, labels))

distribution = tf.contrib.distribute.MirroredStrategy()"><pre class="notranslate"><span class="pl-s1">inputs</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-s1">keras</span>.<span class="pl-s1">layers</span>.<span class="pl-v">Input</span>(<span class="pl-s1">shape</span><span class="pl-c1">=</span>(<span class="pl-c1">1</span>,))
<span class="pl-s1">predictions</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-s1">keras</span>.<span class="pl-s1">layers</span>.<span class="pl-v">Dense</span>(<span class="pl-c1">1</span>)(<span class="pl-s1">inputs</span>)
<span class="pl-s1">model</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-s1">keras</span>.<span class="pl-s1">models</span>.<span class="pl-v">Model</span>(<span class="pl-s1">inputs</span><span class="pl-c1">=</span><span class="pl-s1">inputs</span>, <span class="pl-s1">outputs</span><span class="pl-c1">=</span><span class="pl-s1">predictions</span>)

<span class="pl-s1">features</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-s1">data</span>.<span class="pl-v">Dataset</span>.<span class="pl-en">from_tensors</span>([<span class="pl-c1">1.</span>]).<span class="pl-en">repeat</span>(<span class="pl-c1">10000</span>).<span class="pl-en">batch</span>(<span class="pl-c1">10</span>)
<span class="pl-s1">labels</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-s1">data</span>.<span class="pl-v">Dataset</span>.<span class="pl-en">from_tensors</span>([<span class="pl-c1">1.</span>]).<span class="pl-en">repeat</span>(<span class="pl-c1">10000</span>).<span class="pl-en">batch</span>(<span class="pl-c1">10</span>)
<span class="pl-s1">train_dataset</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-s1">data</span>.<span class="pl-v">Dataset</span>.<span class="pl-en">zip</span>((<span class="pl-s1">features</span>, <span class="pl-s1">labels</span>))

<span class="pl-s1">distribution</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-s1">contrib</span>.<span class="pl-s1">distribute</span>.<span class="pl-v">MirroredStrategy</span>()</pre></div>
<p dir="auto"><strong>Then, this works</strong>:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="model.compile(loss='categorical_crossentropy',
              optimizer=tf.train.GradientDescentOptimizer(learning_rate=0.2),
              distribute=distribution)
model.fit(train_dataset, epochs=5, steps_per_epoch=10)"><pre class="notranslate"><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">'categorical_crossentropy'</span>,
              <span class="pl-s1">optimizer</span><span class="pl-c1">=</span><span class="pl-s1">tf</span>.<span class="pl-s1">train</span>.<span class="pl-v">GradientDescentOptimizer</span>(<span class="pl-s1">learning_rate</span><span class="pl-c1">=</span><span class="pl-c1">0.2</span>),
              <span class="pl-s1">distribute</span><span class="pl-c1">=</span><span class="pl-s1">distribution</span>)
<span class="pl-s1">model</span>.<span class="pl-en">fit</span>(<span class="pl-s1">train_dataset</span>, <span class="pl-s1">epochs</span><span class="pl-c1">=</span><span class="pl-c1">5</span>, <span class="pl-s1">steps_per_epoch</span><span class="pl-c1">=</span><span class="pl-c1">10</span>)</pre></div>
<p dir="auto">But, <strong>Keras optimizers</strong> don't seem to work:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="model.compile(loss='categorical_crossentropy',
              optimizer=tf.keras.optimizers.SGD(lr=0.2, momentum=0.9),
              distribute=distribution)
model.fit(train_dataset, epochs=5, steps_per_epoch=10)"><pre class="notranslate"><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">'categorical_crossentropy'</span>,
              <span class="pl-s1">optimizer</span><span class="pl-c1">=</span><span class="pl-s1">tf</span>.<span class="pl-s1">keras</span>.<span class="pl-s1">optimizers</span>.<span class="pl-v">SGD</span>(<span class="pl-s1">lr</span><span class="pl-c1">=</span><span class="pl-c1">0.2</span>, <span class="pl-s1">momentum</span><span class="pl-c1">=</span><span class="pl-c1">0.9</span>),
              <span class="pl-s1">distribute</span><span class="pl-c1">=</span><span class="pl-s1">distribution</span>)
<span class="pl-s1">model</span>.<span class="pl-en">fit</span>(<span class="pl-s1">train_dataset</span>, <span class="pl-s1">epochs</span><span class="pl-c1">=</span><span class="pl-c1">5</span>, <span class="pl-s1">steps_per_epoch</span><span class="pl-c1">=</span><span class="pl-c1">10</span>)</pre></div>
<p dir="auto">and these <strong>Tensorflow Optimizers</strong> are throwing errors as well:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="model.compile(loss='categorical_crossentropy',
              optimizer=tf.train.AdamOptimizer(learning_rate=0.2),
              distribute=distribution)
model.fit(train_dataset, epochs=5, steps_per_epoch=10)"><pre class="notranslate"><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">'categorical_crossentropy'</span>,
              <span class="pl-s1">optimizer</span><span class="pl-c1">=</span><span class="pl-s1">tf</span>.<span class="pl-s1">train</span>.<span class="pl-v">AdamOptimizer</span>(<span class="pl-s1">learning_rate</span><span class="pl-c1">=</span><span class="pl-c1">0.2</span>),
              <span class="pl-s1">distribute</span><span class="pl-c1">=</span><span class="pl-s1">distribution</span>)
<span class="pl-s1">model</span>.<span class="pl-en">fit</span>(<span class="pl-s1">train_dataset</span>, <span class="pl-s1">epochs</span><span class="pl-c1">=</span><span class="pl-c1">5</span>, <span class="pl-s1">steps_per_epoch</span><span class="pl-c1">=</span><span class="pl-c1">10</span>)</pre></div>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="model.compile(loss='categorical_crossentropy',
              optimizer=tf.train.MomentumOptimizer(learning_rate=0.2, momentum=0.9),
              distribute=distribution)
model.fit(train_dataset, epochs=5, steps_per_epoch=10)"><pre class="notranslate"><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">'categorical_crossentropy'</span>,
              <span class="pl-s1">optimizer</span><span class="pl-c1">=</span><span class="pl-s1">tf</span>.<span class="pl-s1">train</span>.<span class="pl-v">MomentumOptimizer</span>(<span class="pl-s1">learning_rate</span><span class="pl-c1">=</span><span class="pl-c1">0.2</span>, <span class="pl-s1">momentum</span><span class="pl-c1">=</span><span class="pl-c1">0.9</span>),
              <span class="pl-s1">distribute</span><span class="pl-c1">=</span><span class="pl-s1">distribution</span>)
<span class="pl-s1">model</span>.<span class="pl-en">fit</span>(<span class="pl-s1">train_dataset</span>, <span class="pl-s1">epochs</span><span class="pl-c1">=</span><span class="pl-c1">5</span>, <span class="pl-s1">steps_per_epoch</span><span class="pl-c1">=</span><span class="pl-c1">10</span>)</pre></div>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="model.compile(loss='categorical_crossentropy',
              optimizer=tf.train.RMSPropOptimzier(learning_rate=0.2),
              distribute=distribution)
model.fit(train_dataset, epochs=5, steps_per_epoch=10)"><pre class="notranslate"><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">'categorical_crossentropy'</span>,
              <span class="pl-s1">optimizer</span><span class="pl-c1">=</span><span class="pl-s1">tf</span>.<span class="pl-s1">train</span>.<span class="pl-v">RMSPropOptimzier</span>(<span class="pl-s1">learning_rate</span><span class="pl-c1">=</span><span class="pl-c1">0.2</span>),
              <span class="pl-s1">distribute</span><span class="pl-c1">=</span><span class="pl-s1">distribution</span>)
<span class="pl-s1">model</span>.<span class="pl-en">fit</span>(<span class="pl-s1">train_dataset</span>, <span class="pl-s1">epochs</span><span class="pl-c1">=</span><span class="pl-c1">5</span>, <span class="pl-s1">steps_per_epoch</span><span class="pl-c1">=</span><span class="pl-c1">10</span>)</pre></div>
<p dir="auto">Error looks like:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="  File &quot;/usr/local/lib/python3.5/dist-packages/tensorflow/python/keras/engine/training.py&quot;, line 1590, in fit
    validation_steps=validation_steps)
  File &quot;/usr/local/lib/python3.5/dist-packages/tensorflow/python/keras/engine/training_distributed.py&quot;, line 125, in fit_loop
    orig_model_weights = model.get_weights()
  File &quot;/usr/local/lib/python3.5/dist-packages/tensorflow/python/keras/engine/network.py&quot;, line 483, in get_weights
    return backend.batch_get_value(weights)
  File &quot;/usr/local/lib/python3.5/dist-packages/tensorflow/python/keras/backend.py&quot;, line 2717, in batch_get_value
    return get_session().run(tensors)
  File &quot;/usr/local/lib/python3.5/dist-packages/tensorflow/python/keras/backend.py&quot;, line 465, in get_session
    _initialize_variables(session)
  File &quot;/usr/local/lib/python3.5/dist-packages/tensorflow/python/keras/backend.py&quot;, line 710, in _initialize_variables
    variables = _get_variables(ops.get_default_graph())
  File &quot;/usr/local/lib/python3.5/dist-packages/tensorflow/python/keras/backend.py&quot;, line 704, in _get_variables
    variables.update(opt.optimizer.variables())
  File &quot;/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/optimizer.py&quot;, line 785, in variables
    optimizer_variables = [v for v in self._non_slot_variables()
  File &quot;/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/optimizer.py&quot;, line 786, in &lt;listcomp&gt;
    if _from_current_graph(v)]
  File &quot;/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/optimizer.py&quot;, line 779, in _from_current_graph
    return variable.op.graph is current_graph
  File &quot;/usr/local/lib/python3.5/dist-packages/tensorflow/contrib/distribute/python/values.py&quot;, line 305, in op
    return self.get().op
  File &quot;/usr/local/lib/python3.5/dist-packages/tensorflow/contrib/distribute/python/values.py&quot;, line 73, in get
    (device, self._index.keys(), device_util.current())), e)
  File &quot;&lt;string&gt;&quot;, line 3, in raise_from
ValueError: Device /replica:0/task:0/device:CPU:0 not found in dict_keys(['/replica:0/task:0/device:GPU:1', '/replica:0/task:0/device:GPU:0']) (current device )"><pre class="notranslate">  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.5/dist-packages/tensorflow/python/keras/engine/training.py<span class="pl-pds">"</span></span>, line 1590, <span class="pl-k">in</span> fit
    validation_steps=validation_steps)
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.5/dist-packages/tensorflow/python/keras/engine/training_distributed.py<span class="pl-pds">"</span></span>, line 125, <span class="pl-k">in</span> fit_loop
    orig_model_weights = <span class="pl-en">model.get_weights</span>()
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.5/dist-packages/tensorflow/python/keras/engine/network.py<span class="pl-pds">"</span></span>, line 483, <span class="pl-k">in</span> get_weights
    <span class="pl-k">return</span> backend.batch_get_value(weights)
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.5/dist-packages/tensorflow/python/keras/backend.py<span class="pl-pds">"</span></span>, line 2717, <span class="pl-k">in</span> batch_get_value
    <span class="pl-k">return</span> <span class="pl-en">get_session</span>().run(tensors)
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.5/dist-packages/tensorflow/python/keras/backend.py<span class="pl-pds">"</span></span>, line 465, <span class="pl-k">in</span> get_session
    _initialize_variables(session)
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.5/dist-packages/tensorflow/python/keras/backend.py<span class="pl-pds">"</span></span>, line 710, <span class="pl-k">in</span> _initialize_variables
    variables = <span class="pl-en">_get_variables(ops.get_default_graph</span>())
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.5/dist-packages/tensorflow/python/keras/backend.py<span class="pl-pds">"</span></span>, line 704, <span class="pl-k">in</span> _get_variables
    <span class="pl-en">variables.update(opt.optimizer.variables</span>())
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/optimizer.py<span class="pl-pds">"</span></span>, line 785, <span class="pl-k">in</span> variables
    optimizer_variables = [v <span class="pl-k">for</span> <span class="pl-smi">v</span> <span class="pl-k">in</span> <span class="pl-en">self._non_slot_variables</span>()
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/optimizer.py<span class="pl-pds">"</span></span>, line 786, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>listcomp<span class="pl-k">&gt;</span>
    <span class="pl-k">if</span> _from_current_graph(v)]
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/optimizer.py<span class="pl-pds">"</span></span>, line 779, <span class="pl-k">in</span> _from_current_graph
    <span class="pl-k">return</span> variable.op.graph is current_graph
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.5/dist-packages/tensorflow/contrib/distribute/python/values.py<span class="pl-pds">"</span></span>, line 305, <span class="pl-k">in</span> op
    <span class="pl-k">return</span> <span class="pl-en">self.get</span>().op
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.5/dist-packages/tensorflow/contrib/distribute/python/values.py<span class="pl-pds">"</span></span>, line 73, <span class="pl-k">in</span> get
    (device, <span class="pl-en">self._index.keys</span>(), <span class="pl-en">device_util.current</span>())), e)
  File <span class="pl-s"><span class="pl-pds">"</span>&lt;string&gt;<span class="pl-pds">"</span></span>, line 3, <span class="pl-k">in</span> raise_from
ValueError: Device /replica:0/task:0/device:CPU:0 not found <span class="pl-k">in</span> dict_keys([<span class="pl-s"><span class="pl-pds">'</span>/replica:0/task:0/device:GPU:1<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>/replica:0/task:0/device:GPU:0<span class="pl-pds">'</span></span>]) (current device )</pre></div>
<p dir="auto"><strong>System information</strong></p>
<ul dir="auto">
<li>Have I written custom code (as opposed to using a stock example script provided in TensorFlow): yes</li>
<li>OS Platform and Distribution (e.g., Linux Ubuntu 16.04):Linux Ubuntu 16.04</li>
<li>Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:</li>
<li>TensorFlow installed from (source or binary):binary (conda install tensorflow-gpu==1.14.0)</li>
<li>TensorFlow version (use command below): 1.14.0</li>
<li>Python version: Python 3.7.3</li>
<li>Bazel version (if compiling from source):</li>
<li>GCC/Compiler version (if compiling from source):</li>
<li>CUDA/cuDNN version: 10</li>
<li>GPU model and memory: nvidia 1080, 8GB</li>
</ul>
<p dir="auto">You can collect some of this information using our environment capture<br>
<a href="https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh">script</a><br>
You can also obtain the TensorFlow version with: 1. TF 1.0: <code class="notranslate">python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"</code> 2. TF 2.0: <code class="notranslate">python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"</code></p>
<p dir="auto"><strong>Describe the current behavior</strong><br>
Attempting to use progbar as a callback to model.fit() fails.<br>
<strong>Describe the expected behavior</strong><br>
If runing model.fit() with progbar callback and verbosity=0 should be identical to verbosity=1 and no progbar callback<br>
<strong>Code to reproduce the issue</strong><br>
Provide a reproducible test case that is the bare minimum necessary to generate the problem.<br>
current output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'

import tensorflow as tf

print('tf_version:', tf.__version__, 'gpu available:', tf.test.is_gpu_available())
model = tf.keras.applications.ResNet50()


print('compiling model')
model.compile(optimizer='SGD', loss=tf.keras.losses.categorical_crossentropy)

print('running fit function')
x = tf.data.Dataset.from_tensors(tf.zeros([16]+model.input.shape.as_list()[1:]))
y = tf.data.Dataset.from_tensors(tf.zeros([16]+model.output.shape.as_list()[1:]))
print('x:', x, '\ny', y)
model.fit(tf.data.Dataset.zip((x,y)).repeat().shuffle(buffer_size=1),
          steps_per_epoch=10,
          verbose=0,
          callbacks=[tf.keras.callbacks.ProgbarLogger('steps')])
print('done')"><pre class="notranslate"><code class="notranslate">import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'

import tensorflow as tf

print('tf_version:', tf.__version__, 'gpu available:', tf.test.is_gpu_available())
model = tf.keras.applications.ResNet50()


print('compiling model')
model.compile(optimizer='SGD', loss=tf.keras.losses.categorical_crossentropy)

print('running fit function')
x = tf.data.Dataset.from_tensors(tf.zeros([16]+model.input.shape.as_list()[1:]))
y = tf.data.Dataset.from_tensors(tf.zeros([16]+model.output.shape.as_list()[1:]))
print('x:', x, '\ny', y)
model.fit(tf.data.Dataset.zip((x,y)).repeat().shuffle(buffer_size=1),
          steps_per_epoch=10,
          verbose=0,
          callbacks=[tf.keras.callbacks.ProgbarLogger('steps')])
print('done')
</code></pre></div>
<p dir="auto"><strong>Other info / logs</strong><br>
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.<br>
<em>running the code above recreates the problem.</em></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="tf_version: 1.14.0 gpu available: True
WARNING: Logging before flag parsing goes to stderr.
W1003 10:20:49.769316 140195608012544 deprecation.py:506] From /home/hackerman/anaconda3/envs/py36/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:1251: calling VarianceScaling.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
compiling model
running fit function
x: &lt;DatasetV1Adapter shapes: (16, 224, 224, 3), types: tf.float32&gt; 
y &lt;DatasetV1Adapter shapes: (16, 1000), types: tf.float32&gt;
done"><pre class="notranslate"><code class="notranslate">tf_version: 1.14.0 gpu available: True
WARNING: Logging before flag parsing goes to stderr.
W1003 10:20:49.769316 140195608012544 deprecation.py:506] From /home/hackerman/anaconda3/envs/py36/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:1251: calling VarianceScaling.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
compiling model
running fit function
x: &lt;DatasetV1Adapter shapes: (16, 224, 224, 3), types: tf.float32&gt; 
y &lt;DatasetV1Adapter shapes: (16, 1000), types: tf.float32&gt;
done
</code></pre></div>
<p dir="auto"><em>expected output (reproduced by commenting out callback, and setting verbose to 1):</em></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="tf_version: 1.14.0 gpu available: True
WARNING: Logging before flag parsing goes to stderr.
W1003 10:21:47.987383 140242665334528 deprecation.py:506] From /home/hackerman/anaconda3/envs/py36/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:1251: calling VarianceScaling.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
compiling model
running fit function
x: &lt;DatasetV1Adapter shapes: (16, 224, 224, 3), types: tf.float32&gt; 
y &lt;DatasetV1Adapter shapes: (16, 1000), types: tf.float32&gt;
10/10 [==============================] - 6s 592ms/step - loss: 0.0000e+00
done"><pre class="notranslate"><code class="notranslate">tf_version: 1.14.0 gpu available: True
WARNING: Logging before flag parsing goes to stderr.
W1003 10:21:47.987383 140242665334528 deprecation.py:506] From /home/hackerman/anaconda3/envs/py36/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:1251: calling VarianceScaling.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
compiling model
running fit function
x: &lt;DatasetV1Adapter shapes: (16, 224, 224, 3), types: tf.float32&gt; 
y &lt;DatasetV1Adapter shapes: (16, 1000), types: tf.float32&gt;
10/10 [==============================] - 6s 592ms/step - loss: 0.0000e+00
done
</code></pre></div>
<p dir="auto"><em>bonus bug (if keeping callback and setting verbosity to 1):</em></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="tf_version: 1.14.0 gpu available: True
WARNING: Logging before flag parsing goes to stderr.
W1003 10:23:10.488721 140225721059072 deprecation.py:506] From /home/hackerman/anaconda3/envs/py36/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:1251: calling VarianceScaling.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
compiling model
running fit function
x: &lt;DatasetV1Adapter shapes: (16, 224, 224, 3), types: tf.float32&gt; 
y &lt;DatasetV1Adapter shapes: (16, 1000), types: tf.float32&gt;
10/10 [==============================] - 6s 597ms/step - loss: 0.0000e+00
10/10 [==============================] - 6s 597ms/step - loss: 0.0000e+00
done"><pre class="notranslate"><code class="notranslate">tf_version: 1.14.0 gpu available: True
WARNING: Logging before flag parsing goes to stderr.
W1003 10:23:10.488721 140225721059072 deprecation.py:506] From /home/hackerman/anaconda3/envs/py36/lib/python3.7/site-packages/tensorflow/python/ops/init_ops.py:1251: calling VarianceScaling.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
compiling model
running fit function
x: &lt;DatasetV1Adapter shapes: (16, 224, 224, 3), types: tf.float32&gt; 
y &lt;DatasetV1Adapter shapes: (16, 1000), types: tf.float32&gt;
10/10 [==============================] - 6s 597ms/step - loss: 0.0000e+00
10/10 [==============================] - 6s 597ms/step - loss: 0.0000e+00
done
</code></pre></div>