Issue 1:
I've tried to run the setup code in the tutorial, but I met some confusing running errors. I'm new to tensorflow, so I have no idea how to deal with it. Could anybody help me fix this problem? Thanks a lot!

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import os

import numpy as np
import tensorflow as tf

# Data sets
IRIS_TRAINING = os.path.join(os.path.dirname(__file__), "iris_training.csv")
IRIS_TEST = os.path.join(os.path.dirname(__file__), "iris_test.csv")

def main(unused_argv):
# Load datasets.
training_set = tf.contrib.learn.datasets.base.load_csv_with_header(
filename=IRIS_TRAINING, target_dtype=np.int, features_dtype=np.float32)
test_set = tf.contrib.learn.datasets.base.load_csv_with_header(
filename=IRIS_TEST, target_dtype=np.int, features_dtype=np.float32)

# Specify that all features have real-value data
feature_columns = [tf.contrib.layers.real_valued_column("", dimension=4)]

# Build 3 layer DNN with 10, 20, 10 units respectively.
classifier = tf.contrib.learn.DNNClassifier(feature_columns=feature_columns,
hidden_units=[10, 20, 10],
n_classes=3,
model_dir="/tmp/iris_model")

# Fit model.
classifier.fit(x=training_set.data,
y=training_set.target,
steps=2000)

# Evaluate accuracy.
accuracy_score = classifier.evaluate(x=test_set.data,
y=test_set.target)["accuracy"]
print('Accuracy: {0:f}'.format(accuracy_score))

# Classify two new flower samples.
new_samples = np.array(
[[6.4, 3.2, 4.5, 1.5], [5.8, 3.1, 5.0, 1.7]], dtype=float)
y = list(classifier.predict(new_samples, as_iterable=True))
print('Predictions: {}'.format(str(y)))

if __name__ == "__main__":
tf.app.run()

Here is what I saw:

WARNING:tensorflow:From .\logging_monitoring.py:33: calling BaseEstimator.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 .\logging_monitoring.py:33: calling BaseEstimator.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(...))

WARNING:tensorflow:From C:\Program Files\Python36\lib\site-packages\tensorflow\contrib\learn\python\learn\estimators\head.py:642: scalar_summary (from tensorflow.python.ops.logging_ops) is deprecated and will be removed after 2016-11-30.

Instructions for updating:

Please switch to tf.summary.scalar. Note that tf.summary.scalar uses the node name instead of the tag. This means that TensorFlow will automatically de-duplicate summary names based on the scope they are created in. Also, passing a tensor or list of tags to a scalar summary op is no longer supported.

2017-09-07 20:00:50.306221: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.

2017-09-07 20:00:50.306424: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.

2017-09-07 20:00:50.447012: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\framework\op_kernel.cc:1192] Not found: Key dnn/hiddenlayer_0/biases not found in checkpoint

2017-09-07 20:00:50.447738: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\framework\op_kernel.cc:1192] Not found: Key dnn/hiddenlayer_0/weights not found in checkpoint

2017-09-07 20:00:50.448265: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\framework\op_kernel.cc:1192] Not found: Key dnn/hiddenlayer_0/biases/denlayer_0/biases/part_0/Adagrad not found in checkpoint

2017-09-07 20:00:50.451033: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\framework\op_kernel.cc:1192] Not found: Key dnn/multi_class_head/dnn/learning_rate not found in checkpoint

2017-09-07 20:00:50.451078: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\framework\op_kernel.cc:1192] Not found: Key dnn/hiddenlayer_1/biases not found in checkpoint

2017-09-07 20:00:50.451715: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\framework\op_kernel.cc:1192] Not found: Key dnn/hiddenlayer_0/weights/enlayer_0/weights/part_0/Adagrad not found in checkpoint

2017-09-07 20:00:50.452925: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\framework\op_kernel.cc:1192] Not found: Key dnn/hiddenlayer_1/biases/denlayer_1/biases/part_0/Adagrad not found in checkpoint

2017-09-07 20:00:50.454670: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\framework\op_kernel.cc:1192] Not found: Key dnn/logits/weights/nn/logits/weights/part_0/Adagrad not found in checkpoint

2017-09-07 20:00:50.455734: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\framework\op_kernel.cc:1192] Not found: Key dnn/hiddenlayer_1/weights/enlayer_1/weights/part_0/Adagrad not found in checkpoint

2017-09-07 20:00:50.455777: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\framework\op_kernel.cc:1192] Not found: Key dnn/hiddenlayer_1/weights not found in checkpoint

2017-09-07 20:00:50.460821: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\framework\op_kernel.cc:1192] Not found: Key dnn/hiddenlayer_2/biases not found in checkpoint

2017-09-07 20:00:50.463001: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\framework\op_kernel.cc:1192] Not found: Key dnn/logits/weights not found in checkpoint

2017-09-07 20:00:50.464352: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\framework\op_kernel.cc:1192] Not found: Key dnn/hiddenlayer_2/biases/denlayer_2/biases/part_0/Adagrad not found in checkpoint

2017-09-07 20:00:50.464794: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\framework\op_kernel.cc:1192] Not found: Key dnn/hiddenlayer_2/weights not found in checkpoint

2017-09-07 20:00:50.467010: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\framework\op_kernel.cc:1192] Not found: Key dnn/hiddenlayer_2/weights/enlayer_2/weights/part_0/Adagrad not found in checkpoint

2017-09-07 20:00:50.467803: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\framework\op_kernel.cc:1192] Not found: Key dnn/logits/biases/dnn/logits/biases/part_0/Adagrad not found in checkpoint

2017-09-07 20:00:50.472935: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\framework\op_kernel.cc:1192] Not found: Key dnn/logits/biases not found in checkpoint

Traceback (most recent call last):

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\client\session.py", line 1327, in _do_call

return fn(*args)

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\client\session.py", line 1306, in _run_fn

status, run_metadata)

File "C:\Program Files\Python36\lib\contextlib.py", line 88, in exit

next(self.gen)

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 466, in raise_exception_on_not_ok_status

pywrap_tensorflow.TF_GetCode(status))

tensorflow.python.framework.errors_impl.NotFoundError: Key dnn/hiddenlayer_0/biases not found in checkpoint

[[Node: save/RestoreV2 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_arg_save/Const_0_0, save/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File ".\logging_monitoring.py", line 47, in

tf.app.run()

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run

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

File ".\logging_monitoring.py", line 33, in main

steps=2000)

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\util\deprecation.py", line 296, in new_func

return func(*args, **kwargs)

File "C:\Program Files\Python36\lib\site-packages\tensorflow\contrib\learn\python\learn\estimators\estimator.py", line 442, in fit

SKCompat(self).fit(x, y, batch_size, steps, max_steps, monitors)

File "C:\Program Files\Python36\lib\site-packages\tensorflow\contrib\learn\python\learn\estimators\estimator.py", line 1353, in fit

monitors=all_monitors)

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\util\deprecation.py", line 296, in new_func

return func(*args, **kwargs)

File "C:\Program Files\Python36\lib\site-packages\tensorflow\contrib\learn\python\learn\estimators\estimator.py", line 458, in fit

loss = self._train_model(input_fn=input_fn, hooks=hooks)

File "C:\Program Files\Python36\lib\site-packages\tensorflow\contrib\learn\python\learn\estimators\estimator.py", line 1006, in _train_model

config=self._session_config

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\monitored_session.py", line 365, in MonitoredTrainingSession

stop_grace_period_secs=stop_grace_period_secs)

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\monitored_session.py", line 668, in init

stop_grace_period_secs=stop_grace_period_secs)

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\monitored_session.py", line 490, in init

self._sess = _RecoverableSession(self._coordinated_creator)

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\monitored_session.py", line 842, in init

_WrappedSession.init(self, self._create_session())

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\monitored_session.py", line 847, in _create_session

return self._sess_creator.create_session()

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\monitored_session.py", line 551, in create_session

self.tf_sess = self._session_creator.create_session()

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\monitored_session.py", line 425, in create_session

init_fn=self._scaffold.init_fn)

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\session_manager.py", line 273, in prepare_session

config=config)

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\session_manager.py", line 205, in _restore_checkpoint

saver.restore(sess, ckpt.model_checkpoint_path)

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\saver.py", line 1560, in restore

{self.saver_def.filename_tensor_name: save_path})

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\client\session.py", line 895, in run

run_metadata_ptr)

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\client\session.py", line 1124, in _run

feed_dict_tensor, options, run_metadata)

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\client\session.py", line 1321, in _do_run

options, run_metadata)

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\client\session.py", line 1340, in _do_call

raise type(e)(node_def, op, message)

tensorflow.python.framework.errors_impl.NotFoundError: Key dnn/hiddenlayer_0/biases not found in checkpoint

[[Node: save/RestoreV2 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_arg_save/Const_0_0, save/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]

Caused by op 'save/RestoreV2', defined at:

File ".\logging_monitoring.py", line 47, in

tf.app.run()

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run

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

File ".\logging_monitoring.py", line 33, in main

steps=2000)

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\util\deprecation.py", line 296, in new_func

return func(*args, **kwargs)

File "C:\Program Files\Python36\lib\site-packages\tensorflow\contrib\learn\python\learn\estimators\estimator.py", line 442, in fit

SKCompat(self).fit(x, y, batch_size, steps, max_steps, monitors)

File "C:\Program Files\Python36\lib\site-packages\tensorflow\contrib\learn\python\learn\estimators\estimator.py", line 1353, in fit

monitors=all_monitors)

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\util\deprecation.py", line 296, in new_func

return func(*args, **kwargs)

File "C:\Program Files\Python36\lib\site-packages\tensorflow\contrib\learn\python\learn\estimators\estimator.py", line 458, in fit

loss = self._train_model(input_fn=input_fn, hooks=hooks)

File "C:\Program Files\Python36\lib\site-packages\tensorflow\contrib\learn\python\learn\estimators\estimator.py", line 1006, in _train_model

config=self._session_config

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\monitored_session.py", line 365, in MonitoredTrainingSession

stop_grace_period_secs=stop_grace_period_secs)

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\monitored_session.py", line 668, in init

stop_grace_period_secs=stop_grace_period_secs)

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\monitored_session.py", line 490, in init

self._sess = _RecoverableSession(self._coordinated_creator)

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\monitored_session.py", line 842, in init

_WrappedSession.init(self, self._create_session())

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\monitored_session.py", line 847, in _create_session

return self._sess_creator.create_session()

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\monitored_session.py", line 551, in create_session

self.tf_sess = self._session_creator.create_session()

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\monitored_session.py", line 416, in create_session

self._scaffold.finalize()

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\monitored_session.py", line 209, in finalize

self._saver.build()

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\saver.py", line 1172, in build

filename=self._filename)

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\saver.py", line 684, in build

restore_sequentially, reshape)

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\saver.py", line 450, in _AddShardedRestoreOps

name="restore_shard"))

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\saver.py", line 407, in _AddRestoreOps

tensors = self.restore_op(filename_tensor, saveable, preferred_shard)

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\saver.py", line 247, in restore_op

[spec.tensor.dtype])[0])

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\ops\gen_io_ops.py", line 663, in restore_v2

dtypes=dtypes, name=name)

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 767, in apply_op

op_def=op_def)

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\framework\ops.py", line 2630, in create_op

original_op=self._default_original_op, op_def=op_def)

File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\framework\ops.py", line 1204, in init

self._traceback = self._graph._extract_stack() # pylint: disable=protected-access

NotFoundError (see above for traceback): Key dnn/hiddenlayer_0/biases not found in checkpoint

[[Node: save/RestoreV2 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_arg_save/Const_0_0, save/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]

ERROR:tensorflow:==================================

Object was never used (type <class 'tensorflow.python.framework.ops.Tensor'>):

<tf.Tensor 'report_uninitialized_variables_1/boolean_mask/Gather:0' shape=(?,) dtype=string>

If you want to mark it as used call its "mark_used()" method.

It was originally created here:

['File ".\logging_monitoring.py", line 47, in \n tf.app.run()', 'File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run\n _sys.exit(main(_sys.argv[:1] + flags_passthrough))', 'File ".\logging_monitoring.py", line 33, in main\n steps=2000)', 'File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\util\deprecation.py", line 296, in new_func\n return func(*args, **kwargs)', 'File "C:\Program Files\Python36\lib\site-packages\tensorflow\contrib\learn\python\learn\estimators\estimator.py", line 442, in fit\n SKCompat(self).fit(x, y, batch_size, steps, max_steps, monitors)', 'File "C:\Program Files\Python36\lib\site-packages\tensorflow\contrib\learn\python\learn\estimators\estimator.py", line 1353, in fit\n monitors=all_monitors)', 'File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\util\deprecation.py", line 296, in new_func\n return func(*args, **kwargs)', 'File "C:\Program Files\Python36\lib\site-packages\tensorflow\contrib\learn\python\learn\estimators\estimator.py", line 458, in fit\n loss = self._train_model(input_fn=input_fn, hooks=hooks)', 'File "C:\Program Files\Python36\lib\site-packages\tensorflow\contrib\learn\python\learn\estimators\estimator.py", line 1006, in _train_model\n config=self._session_config', 'File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\monitored_session.py", line 365, in MonitoredTrainingSession\n stop_grace_period_secs=stop_grace_period_secs)', 'File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\monitored_session.py", line 668, in init\n stop_grace_period_secs=stop_grace_period_secs)', 'File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\monitored_session.py", line 490, in init\n self._sess = _RecoverableSession(self._coordinated_creator)', 'File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\monitored_session.py", line 842, in init\n _WrappedSession.init(self, self._create_session())', 'File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\monitored_session.py", line 847, in _create_session\n return self._sess_creator.create_session()', 'File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\monitored_session.py", line 551, in create_session\n self.tf_sess = self._session_creator.create_session()', 'File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\monitored_session.py", line 416, in create_session\n self._scaffold.finalize()', 'File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\monitored_session.py", line 196, in finalize\n default_ready_for_local_init_op)', 'File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\monitored_session.py", line 258, in get_or_default\n op = default_constructor()', 'File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\training\monitored_session.py", line 193, in default_ready_for_local_init_op\n variables.global_variables())', 'File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\util\tf_should_use.py", line 175, in wrapped\n return _add_should_use_warning(fn(*args, **kwargs))', 'File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\util\tf_should_use.py", line 144, in _add_should_use_warning\n wrapped = TFShouldUseWarningWrapper(x)', 'File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\util\tf_should_use.py", line 101, in init\n stack = [s.strip() for s in traceback.format_stack()]']

Issue 2:
This is a duplicate request from pytorch issue, which I even reuse their issue title

pytorch/pytorch#3790

And the fix from the paper seems to be trivial but I'm not sure how TF should approach this, perhaps just adding another parameter?