<p dir="auto">According to Tensorflow 2.0, many important functions are deprecated, such as:<br>
tf.layers.dense()<br>
tf.layers.dropout()<br>
tf.layers.flatten()<br>
tf.layers.batch_normalization()<br>
...<br>
Since these functions are very widely used, and also very helpful for building complicted models, would you please keep them in the future versions?</p>
<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>: Y</li>
<li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>: Linux Ubuntu 18.04</li>
<li><strong>TensorFlow installed from (source or binary)</strong>: source</li>
<li><strong>TensorFlow version (use command below)</strong>: ('v1.8.0-4015-g44a1f241bc', '1.9.0-rc0')</li>
<li><strong>Python version</strong>: 2.7.15rc1</li>
<li><strong>Bazel version (if compiling from source)</strong>: 0.15.0</li>
<li><strong>GCC/Compiler version (if compiling from source)</strong>: 6.4.0</li>
<li><strong>CUDA/cuDNN version</strong>: 9.0.176/7.0.5</li>
<li><strong>GPU model and memory</strong>: GeForce GTX 1080 Ti (11GB)</li>
<li><strong>Exact command to reproduce</strong>:</li>
</ul>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import tensorflow as tf
with tf.Session() as sess:
    movie_bin = tf.read_file('5205acf1-3d30b48d.mov')
    movie = tf.contrib.ffmpeg.decode_video(movie_bin)
    movie_ev = movie.eval()
    print(&quot;****&quot;, len(movie_ev))"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">tensorflow</span> <span class="pl-k">as</span> <span class="pl-s1">tf</span>
<span class="pl-k">with</span> <span class="pl-s1">tf</span>.<span class="pl-v">Session</span>() <span class="pl-k">as</span> <span class="pl-s1">sess</span>:
    <span class="pl-s1">movie_bin</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-en">read_file</span>(<span class="pl-s">'5205acf1-3d30b48d.mov'</span>)
    <span class="pl-s1">movie</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-s1">contrib</span>.<span class="pl-s1">ffmpeg</span>.<span class="pl-en">decode_video</span>(<span class="pl-s1">movie_bin</span>)
    <span class="pl-s1">movie_ev</span> <span class="pl-c1">=</span> <span class="pl-s1">movie</span>.<span class="pl-en">eval</span>()
    <span class="pl-en">print</span>(<span class="pl-s">"****"</span>, <span class="pl-en">len</span>(<span class="pl-s1">movie_ev</span>))</pre></div>
<h3 dir="auto">Describe the problem</h3>
<p dir="auto">The <code class="notranslate">tf.contrib.ffmpeg.decode_video</code> op throws an error and causes a core dump.</p>
<p dir="auto">My ffmpeg version (<code class="notranslate">apt get install ffmpeg</code> on ubuntu 18.04):</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="ffmpeg version 3.4.2-2 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-16ubuntu2)
  configuration: --prefix=/usr --extra-version=2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100"><pre class="notranslate">ffmpeg version 3.4.2-2 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-16ubuntu2)
  configuration: --prefix=/usr --extra-version=2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100</pre></div>
<h3 dir="auto">Source code / logs</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="2018-06-27 09:15:22.489692: F tensorflow/contrib/ffmpeg/default/ffmpeg_lib.cc:405] Non-OK-status: ReadInfoFile(stderr_filename, width, height, frames) status: Unknown: Not enough video info returned by FFmpeg [0, 720, 1280, 3]Could not read FFmpeg stderr file: /tmp/tmp_file_tensorflow_3_ILW8Ht.err
Aborted (core dumped)"><pre class="notranslate">2018-06-27 09:15:22.489692: F tensorflow/contrib/ffmpeg/default/ffmpeg_lib.cc:405] Non-OK-status: ReadInfoFile(stderr_filename, width, height, frames) status: Unknown: Not enough video info returned by FFmpeg [0, 720, 1280, 3]Could not <span class="pl-c1">read</span> FFmpeg stderr file: /tmp/tmp_file_tensorflow_3_ILW8Ht.err
Aborted (core dumped)</pre></div>