Issue 1:
Environment info

Operating System:

tensorflow docker(ubuntu 14.04)

Version

tensorflow (0.12.1)/ tensorflow-gpu (0.12.1)

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

From official example:

https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/learn/text_classification_character_rnn.py

Logs or other output that would be helpful

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

tensorflow-gpu (0.12.1)

default dataset 'dbpedia' and my data set both get

WARNING:tensorflow:Using temporary folder as model directory: /tmp/tmpUlkI0V
INFO:tensorflow:Using default config.
INFO:tensorflow:Using config: {'save_summary_steps': 100, '_num_ps_replicas': 0, '_task_type': None, '_environment': 'local', '_is_chief': True, 'save_checkpoints_secs': 600, '_cluster_spec': <tensorflow.python.training.server_lib.ClusterSpec object at 0x7f26f2317750>, 'tf_config': gpu_options {
per_process_gpu_memory_fraction: 1
}
, '_task_id': 0, 'tf_random_seed': None, 'keep_checkpoint_every_n_hours': 10000, '_evaluation_master': '', 'save_checkpoints_steps': None, '_master': '', 'keep_checkpoint_max': 5}
WARNING:tensorflow:From <ipython-input-1-f55d1ba92119>:85 in main.: calling fit (from tensorflow.contrib.learn.python.learn.estimators.estimator) with x is deprecated and will be removed after 2016-12-01.
Instructions for updating:
Estimator is decoupled from Scikit Learn interface by moving into
separate class SKCompat. Arguments x, y and batch_size are only
available in the SKCompat class, Estimator will only accept input_fn.
Example conversion:
est = Estimator(...) -> est = SKCompat(Estimator(...))
WARNING:tensorflow:From <ipython-input-1-f55d1ba92119>:85 in main.: calling fit (from tensorflow.contrib.learn.python.learn.estimators.estimator) with y is deprecated and will be removed after 2016-12-01.
Instructions for updating:
Estimator is decoupled from Scikit Learn interface by moving into
separate class SKCompat. Arguments x, y and batch_size are only
available in the SKCompat class, Estimator will only accept input_fn.
Example conversion:
est = Estimator(...) -> est = SKCompat(Estimator(...))

TypeErrorTraceback (most recent call last)
<ipython-input-1-f55d1ba92119> in <module>()
93
94
---> 95 tf.app.run(main=main)

/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.pyc in run(main, argv)
41 # Call the main function, passing through any arguments
42 # to the final program.
---> 43 sys.exit(main(sys.argv[:1] + flags_passthrough))

<ipython-input-1-f55d1ba92119> in main(unused_argv)
83
84 # Train and predict
---> 85 classifier.fit(x_train, y_train, steps=100)
86 y_predicted = [
87 p['class'] for p in classifier.predict(

/usr/local/lib/python2.7/dist-packages/tensorflow/python/util/deprecation.pyc in new_func(*args, **kwargs)
189 _call_location(), decorator_utils.get_qualified_name(func),
190 func.__module__, arg_name, date, instructions)
--> 191 return func(*args, **kwargs)
192 new_func.__doc__ = _add_deprecated_arg_notice_to_docstring(
193 func.__doc__, date, instructions)

/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.pyc in fit(self, x, y, input_fn, steps, batch_size, monitors, max_steps)
353 steps=steps,
354 monitors=monitors,
--> 355 max_steps=max_steps)
356 logging.info('Loss for final step: %s.', loss)
357 return self

/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.pyc in _train_model(self, input_fn, steps, feed_fn, init_op, init_feed_fn, init_fn, device_fn, monitors, log_every_steps, fail_on_nan_loss, max_steps)
697 # cases, but will soon be deleted after the subclasses are updated.
698 # TODO(b/32664904): Update subclasses and delete the else-statement.
--> 699 train_ops = self._get_train_ops(features, labels)
700 if isinstance(train_ops, model_fn_lib.ModelFnOps): # Default signature
701 train_op = train_ops.train_op

/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.pyc in _get_train_ops(self, features, labels)
1050 `ModelFnOps` object.
1051 """
-> 1052 return self._call_model_fn(features, labels, model_fn_lib.ModeKeys.TRAIN)
1053
1054 def _get_eval_ops(self, features, labels, metrics):

/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.pyc in _call_model_fn(self, features, labels, mode)
1021 model_fn_results = self._model_fn(features, labels, mode=mode)
1022 else:
-> 1023 model_fn_results = self._model_fn(features, labels)
1024
1025 if isinstance(model_fn_results, model_fn_lib.ModelFnOps):

<ipython-input-1-f55d1ba92119> in char_cnn_model(features, target)
31 # Apply Convolution filtering on input sequence.
32 conv1 = tf.contrib.layers.convolution2d(
---> 33 byte_list, N_FILTERS, FILTER_SHAPE1, padding='VALID')
34 # Add a RELU for non linearity.
35 conv1 = tf.nn.relu(conv1)

/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/framework/python/ops/arg_scope.pyc in func_with_args(*args, **kwargs)
175 current_args = current_scope[key_func].copy()
176 current_args.update(kwargs)
--> 177 return func(*args, **current_args)
178 _add_op(func)
179 setattr(func_with_args, '_key_op', _key_op(func))

/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/layers/python/layers/layers.pyc in convolution(inputs, num_outputs, kernel_size, stride, padding, data_format, rate, activation_fn, normalizer_fn, normalizer_params, weights_initializer, weights_regularizer, biases_initializer, biases_regularizer, reuse, variables_collections, outputs_collections, trainable, scope)
838 regularizer=weights_regularizer,
839 collections=weights_collections,
--> 840 trainable=trainable)
841 outputs = nn.convolution(input=inputs,
842 filter=weights,

/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/framework/python/ops/arg_scope.pyc in func_with_args(*args, **kwargs)
175 current_args = current_scope[key_func].copy()
176 current_args.update(kwargs)
--> 177 return func(*args, **current_args)
178 _add_op(func)
179 setattr(func_with_args, '_key_op', _key_op(func))

/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/framework/python/ops/variables.pyc in model_variable(name, shape, dtype, initializer, regularizer, trainable, collections, caching_device, device)
242 initializer=initializer, regularizer=regularizer,
243 trainable=trainable, collections=collections,
--> 244 caching_device=caching_device, device=device)
245
246

/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/framework/python/ops/arg_scope.pyc in func_with_args(*args, **kwargs)
175 current_args = current_scope[key_func].copy()
176 current_args.update(kwargs)
--> 177 return func(*args, **current_args)
178 _add_op(func)
179 setattr(func_with_args, '_key_op', _key_op(func))

/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/framework/python/ops/variables.pyc in variable(name, shape, dtype, initializer, regularizer, trainable, collections, caching_device, device)
206 trainable=trainable,
207 collections=collections,
--> 208 caching_device=caching_device)
209
210

/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.pyc in get_variable(name, shape, dtype, initializer, regularizer, trainable, collections, caching_device, partitioner, validate_shape, custom_getter)
1022 collections=collections, caching_device=caching_device,
1023 partitioner=partitioner, validate_shape=validate_shape,
-> 1024 custom_getter=custom_getter)
1025
1026

/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.pyc in get_variable(self, var_store, name, shape, dtype, initializer, regularizer, trainable, collections, caching_device, partitioner, validate_shape, custom_getter)
848 collections=collections, caching_device=caching_device,
849 partitioner=partitioner, validate_shape=validate_shape,
--> 850 custom_getter=custom_getter)
851
852 def _get_partitioned_variable(self,

/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.pyc in get_variable(self, name, shape, dtype, initializer, regularizer, reuse, trainable, collections, caching_device, partitioner, validate_shape, custom_getter)
344 reuse=reuse, trainable=trainable, collections=collections,
345 caching_device=caching_device, partitioner=partitioner,
--> 346 validate_shape=validate_shape)
347
348 def _get_partitioned_variable(

/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.pyc in _true_getter(name, shape, dtype, initializer, regularizer, reuse, trainable, collections, caching_device, partitioner, validate_shape)
329 initializer=initializer, regularizer=regularizer, reuse=reuse,
330 trainable=trainable, collections=collections,
--> 331 caching_device=caching_device, validate_shape=validate_shape)
332
333 if custom_getter is not None:

/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.pyc in _get_single_variable(self, name, shape, dtype, initializer, regularizer, partition_info, reuse, trainable, collections, caching_device, validate_shape)
675 dtype=variable_dtype,
676 validate_shape=validate_shape,
--> 677 expected_shape=shape)
678 self._vars[name] = v
679 logging.vlog(1, "Created variable %s with shape %s and init %s", v.name,

/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variables.pyc in __init__(self, initial_value, trainable, collections, validate_shape, caching_device, name, variable_def, dtype, expected_shape, import_scope)
222 name=name,
223 dtype=dtype,
--> 224 expected_shape=expected_shape)
225
226 def __str__(self):

/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variables.pyc in _init_from_args(self, initial_value, trainable, collections, validate_shape, caching_device, name, dtype, expected_shape)
325 # with the variable itself.
326 self._initial_value = ops.convert_to_tensor(
--> 327 initial_value(), name="initial_value", dtype=dtype)
328 assert_expected_shape()
329

/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.pyc in <lambda>()
663 else:
664 init_val = lambda: initializer(
--> 665 shape.as_list(), dtype=dtype, partition_info=partition_info)
666 variable_dtype = dtype.base_dtype
667

/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/layers/python/layers/initializers.pyc in _initializer(shape, dtype, partition_info)
118 """Initializer function."""
119 if not dtype.is_floating:
--> 120 raise TypeError('Cannot create initializer for non-floating point type.')
121 # Estimating fan_in and fan_out is not possible to do perfectly, but we try.
122 # This is the right thing for matrix multiply and convolutions.

TypeError: Cannot create initializer for non-floating point type.

Issue 2:
Operating System: Mac OS [10.11.6]

Installed version of CUDA and cuDNN: CUDA 8.0, cudnn-8.0-osx-x64-v5.1

(please attach the output of ls -l /path/to/cuda/lib/libcud*):

8 lrwxr-xr-x 1 root admin 13B Dec 15 13:34 /usr/local/cuda/lib/libcuda.1.dylib@ -> libcuda.dylib
32 -rwxr-xr-x 1 root wheel 13K Nov 3 22:09 /usr/local/cuda/lib/libcuda.dylib*
8 lrwxr-xr-x 1 root wheel 45B Nov 3 22:10 /usr/local/cuda/lib/libcudadevrt.a@ -> /Developer/NVIDIA/CUDA-8.0/lib/libcudadevrt.a
8 lrwxr-xr-x 1 root wheel 50B Nov 3 22:10 /usr/local/cuda/lib/libcudart.8.0.dylib@ -> /Developer/NVIDIA/CUDA-8.0/lib/libcudart.8.0.dylib
8 lrwxr-xr-x 1 root wheel 46B Nov 3 22:10 /usr/local/cuda/lib/libcudart.dylib@ -> /Developer/NVIDIA/CUDA-8.0/lib/libcudart.dylib
8 lrwxr-xr-x 1 root wheel 49B Nov 3 22:10 /usr/local/cuda/lib/libcudart_static.a@ -> /Developer/NVIDIA/CUDA-8.0/lib/libcudart_static.a
151304 -rwxr-xr-x@ 1 AmirHJ admin 74M Jul 27 11:48 /usr/local/cuda/lib/libcudnn.5.dylib*
8 lrwxr-xr-x 1 AmirHJ admin 16B Jul 27 11:51 /usr/local/cuda/lib/libcudnn.dylib@ -> libcudnn.5.dylib
128152 -rw-r--r--@ 1 AmirHJ admin 63M Jul 27 11:48 /usr/local/cuda/lib/libcudnn_static.a

If installed from binary pip package, provide:

A link to the pip package you installed: tensorflow-gpu==0.12.0rc1

The output from python -c "import tensorflow; print(tensorflow.__version__)". 0.12.0-rc1

Running Text Classification Using Convolutional Neural Networks on Characters:

python test.py

I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcublas.dylib locally

I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcudnn.dylib locally

I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcufft.dylib locally

I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcuda.1.dylib locally

I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcurand.dylib locally

WARNING:tensorflow:Using temporary folder as model directory: /var/folders/gy/035w5b717yn01k9qlwvtcp1h0000gn/T/tmpU1WjvQ

WARNING:tensorflow:From test.py:105 in main.: calling fit (from tensorflow.contrib.learn.python.learn.estimators.estimator) with x is deprecated and will be removed after 2016-12-01.

Instructions for updating:

Estimator is decoupled from Scikit Learn interface by moving into

separate class SKCompat. Arguments x, y and batch_size are only

available in the SKCompat class, Estimator will only accept input_fn.

Example conversion:

est = Estimator(...) -> est = SKCompat(Estimator(...))

WARNING:tensorflow:From test.py:105 in main.: calling fit (from tensorflow.contrib.learn.python.learn.estimators.estimator) with y is deprecated and will be removed after 2016-12-01.

Instructions for updating:

Estimator is decoupled from Scikit Learn interface by moving into

separate class SKCompat. Arguments x, y and batch_size are only

available in the SKCompat class, Estimator will only accept input_fn.

Example conversion:

est = Estimator(...) -> est = SKCompat(Estimator(...))

Traceback (most recent call last):

File "test.py", line 121, in

tf.app.run(main=main, argv=[sys.argv[0]] + unparsed)

File "/usr/local/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 43, in run

sys.exit(main(sys.argv[:1] + flags_passthrough))

File "test.py", line 105, in main

classifier.fit(x_train, y_train, steps=100)

File "/usr/local/lib/python2.7/site-packages/tensorflow/python/util/deprecation.py", line 191, in new_func

return func(*args, **kwargs)

File "/usr/local/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 355, in fit

max_steps=max_steps)

File "/usr/local/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 699, in _train_model

train_ops = self._get_train_ops(features, labels)

File "/usr/local/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 1052, in _get_train_ops

return self._call_model_fn(features, labels, model_fn_lib.ModeKeys.TRAIN)

File "/usr/local/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 1023, in _call_model_fn

model_fn_results = self._model_fn(features, labels)

File "test.py", line 59, in char_cnn_model

byte_list, N_FILTERS, FILTER_SHAPE1, padding='VALID')

File "/usr/local/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/arg_scope.py", line 177, in func_with_args

return func(*args, **current_args)

File "/usr/local/lib/python2.7/site-packages/tensorflow/contrib/layers/python/layers/layers.py", line 840, in convolution

trainable=trainable)

File "/usr/local/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/arg_scope.py", line 177, in func_with_args

return func(*args, **current_args)

File "/usr/local/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/variables.py", line 244, in model_variable

caching_device=caching_device, device=device)

File "/usr/local/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/arg_scope.py", line 177, in func_with_args

return func(*args, **current_args)

File "/usr/local/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/variables.py", line 208, in variable

caching_device=caching_device)

File "/usr/local/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 1024, in get_variable

custom_getter=custom_getter)

File "/usr/local/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 850, in get_variable

custom_getter=custom_getter)

File "/usr/local/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 346, in get_variable

validate_shape=validate_shape)

File "/usr/local/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 331, in _true_getter

caching_device=caching_device, validate_shape=validate_shape)

File "/usr/local/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 677, in _get_single_variable

expected_shape=shape)

File "/usr/local/lib/python2.7/site-packages/tensorflow/python/ops/variables.py", line 224, in init

expected_shape=expected_shape)

File "/usr/local/lib/python2.7/site-packages/tensorflow/python/ops/variables.py", line 327, in _init_from_args

initial_value(), name="initial_value", dtype=dtype)

File "/usr/local/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 665, in

shape.as_list(), dtype=dtype, partition_info=partition_info)

File "/usr/local/lib/python2.7/site-packages/tensorflow/contrib/layers/python/layers/initializers.py", line 120, in _initializer

raise TypeError('Cannot create initializer for non-floating point type.')

TypeError: Cannot create initializer for non-floating point type.