Issue 1:
Not sure why the random state changed for non random operation like tf.constant

pip freeze|grep "python\|tensorflow"

python-dateutil==2.7.2

tensorflow==1.5.0

tensorflow-tensorboard==1.5.1

cat test.py

import tensorflow as tf
print(tf.__version__)
seed = 0
def test1():
graph = tf.Graph()
with graph.as_default():
tf.set_random_seed(seed)
aaa = tf.random_uniform([1])
sess = tf.Session(graph = graph)
print(sess.run(aaa))
print(sess.run(aaa))

def test2():
graph = tf.Graph()
with graph.as_default():
tf.set_random_seed(seed)
bbb = tf.constant([1,2])
aaa = tf.random_uniform([1])
sess = tf.Session(graph = graph)
print(sess.run(aaa))
print(sess.run(aaa))
if __name__ == "__main__":
test1()
test1()
test2()

python test.py

/home/tom/pyenv/anti/local/lib/python2.7/site-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.

from ._conv import register_converters as _register_converters

1.5.0

2018-06-14 16:06:47.429664: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA

[0.3206401]

[0.012326]

[0.3206401]

[0.012326]

[0.2773143]

[0.92967796]

Issue 2:
Environment info

Operating System:

Windows 10, 64 bit

Installed version of CUDA and cuDNN:

CUDA 8.0

cuDNN 5.1

Intalled TF by the following:

pip3 install --upgrade tensorflow-gpu

If possible, provide a minimal reproducible example (We usually don't have time to read hundreds of lines of your code)

import tensorflow as tf
from tensorflow.contrib import rnn
seq_max_len = 6
num_hidden = 5
sample_size = 4

#print(seq_len_arr)
x = tf.placeholder(tf.float32, [None, seq_max_len, sample_size], name='x')

seq_len = tf.placeholder(tf.int32, [None])

lstm_cell = rnn.LSTMBlockCell(num_hidden)
lstmLayers = rnn.MultiRNNCell([lstm_cell]*1)
outputs, states = tf.nn.dynamic_rnn(lstmLayers, x, sequence_length=seq_len, dtype=np.float32)
init_op = tf.global_variables_initializer()

Logs or other output that would be helpful

(If logs are large, please upload as attachment or provide link).

I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:135] successfully opened CUDA library cublas64_80.dll locally

I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:135] successfully opened CUDA library cudnn64_5.dll locally

I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:135] successfully opened CUDA library cufft64_80.dll locally

I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:135] successfully opened CUDA library nvcuda.dll locally

I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:135] successfully opened CUDA library curand64_80.dll locally

E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "BestSplits" device_type: "CPU"') for unknown op: BestSplits

E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "CountExtremelyRandomStats" device_type: "CPU"') for unknown op: CountExtremelyRandomStats

E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "FinishedNodes" device_type: "CPU"') for unknown op: FinishedNodes

E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "GrowTree" device_type: "CPU"') for unknown op: GrowTree

E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "ReinterpretStringToFloat" device_type: "CPU"') for unknown op: ReinterpretStringToFloat

E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "SampleInputs" device_type: "CPU"') for unknown op: SampleInputs

E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "ScatterAddNdim" device_type: "CPU"') for unknown op: ScatterAddNdim

E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "TopNInsert" device_type: "CPU"') for unknown op: TopNInsert

E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "TopNRemove" device_type: "CPU"') for unknown op: TopNRemove

E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "TreePredictions" device_type: "CPU"') for unknown op: TreePredictions

E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "UpdateFertileSlots" device_type: "CPU"') for unknown op: UpdateFertileSlots

Traceback (most recent call last):

File "debug_lstm_zeros2.py", line 33, in

outputs, states = tf.nn.dynamic_rnn(lstmLayers, x, sequence_length=seq_len, dtype=np.float32)

File "C:\Users\jun\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\ops\rnn.py", line 545, in dynamic_rnn

dtype=dtype)

File "C:\Users\jun\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\ops\rnn.py", line 712, in _dynamic_rnn_loop

swap_memory=swap_memory)

File "C:\Users\jun\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 2626, in while_loop

result = context.BuildLoop(cond, body, loop_vars, shape_invariants)

File "C:\Users\jun\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 2459, in BuildLoop

pred, body, original_loop_vars, loop_vars, shape_invariants)

File "C:\Users\jun\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 2409, in _BuildLoop

body_result = body(*packed_vars_for_body)

File "C:\Users\jun\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\ops\rnn.py", line 695, in _time_step

skip_conditionals=True)

File "C:\Users\jun\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\ops\rnn.py", line 177, in _rnn_step

new_output, new_state = call_cell()

File "C:\Users\jun\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\ops\rnn.py", line 683, in

call_cell = lambda: cell(input_t, state)

File "C:\Users\jun\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\contrib\rnn\python\ops\core_rnn_cell_impl.py", line 655, in call

cur_inp, new_state = cell(cur_inp, cur_state)

File "C:\Users\jun\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\contrib\rnn\python\ops\lstm_ops.py", line 402, in call

use_peephole=self._use_peephole)

File "C:\Users\jun\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\contrib\rnn\python\ops\lstm_ops.py", line 122, in _lstm_block_cell

return _lstm_ops_so.lstm_block_cell(

AttributeError: 'NoneType' object has no attribute 'lstm_block_cell'

Thanks a lot for your assistance!

Jun