I am trying to implement a DNN Classifier with an estimator as shown in this tutorial: <http://nbviewer.jupyter.org/gist/yufengg/7dd4170cc730ce418a1dcd141532ec6e>

However, whenever I run the code, I am getting this lengthy error message:

Traceback (most recent call last):
 File "/Users/vivekreddy/Desktop/NN/IRis Practice Estimators.py", line 48, in 
 steps=1000)
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/estimator/estimator.py", line 352, in train
 loss = self.\_train\_model(input\_fn, hooks, saving\_listeners)
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/estimator/estimator.py", line 888, in \_train\_model
 log\_step\_count\_steps=self.\_config.log\_step\_count\_steps) as mon\_sess:
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/training/monitored\_session.py", line 384, in MonitoredTrainingSession
 stop\_grace\_period\_secs=stop\_grace\_period\_secs)
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/training/monitored\_session.py", line 795, in **init**
 stop\_grace\_period\_secs=stop\_grace\_period\_secs)
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/training/monitored\_session.py", line 518, in **init**
 self.\_sess = \_RecoverableSession(self.\_coordinated\_creator)
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/training/monitored\_session.py", line 981, in **init**
 \_WrappedSession.**init**(self, self.\_create\_session())
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/training/monitored\_session.py", line 986, in \_create\_session
 return self.\_sess\_creator.create\_session()
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/training/monitored\_session.py", line 675, in create\_session
 self.tf\_sess = self.\_session\_creator.create\_session()
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/training/monitored\_session.py", line 446, in create\_session
 init\_fn=self.\_scaffold.init\_fn)
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/training/session\_manager.py", line 275, in prepare\_session
 config=config)
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/training/session\_manager.py", line 207, in \_restore\_checkpoint
 saver.restore(sess, ckpt.model\_checkpoint\_path)
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1755, in restore
 {self.saver\_def.filename\_tensor\_name: save\_path})
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 905, in run
 run\_metadata\_ptr)
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1137, in \_run
 feed\_dict\_tensor, options, run\_metadata)
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1355, in \_do\_run
 options, run\_metadata)
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1374, in \_do\_call
 raise type(e)(node\_def, op, message)
NotFoundError: Key dnn/hiddenlayer\_0/bias not found in checkpoint
 [[Node: save/RestoreV2 = RestoreV2[dtypes=[DT\_FLOAT, DT\_FLOAT, DT\_FLOAT, DT\_FLOAT, DT\_FLOAT, ..., DT\_FLOAT, DT\_FLOAT, DT\_FLOAT, DT\_FLOAT, DT\_INT64], \_device="/job:localhost/replica:0/task:0/device:CPU:0"](\_arg\_save/Const\_0\_0, save/RestoreV2/tensor\_names, save/RestoreV2/shape\_and\_slices)]]

Caused by op u'save/RestoreV2', defined at:
 File "", line 1, in 
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/run.py", line 115, in main
 ret = method(\*args, \*\*kwargs)
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/run.py", line 325, in runcode
 exec code in self.locals
 File "/Users/vivekreddy/Desktop/NN/IRis Practice Estimators.py", line 48, in 
 steps=1000)
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/estimator/estimator.py", line 352, in train
 loss = self.\_train\_model(input\_fn, hooks, saving\_listeners)
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/estimator/estimator.py", line 888, in \_train\_model
 log\_step\_count\_steps=self.\_config.log\_step\_count\_steps) as mon\_sess:
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/training/monitored\_session.py", line 384, in MonitoredTrainingSession
 stop\_grace\_period\_secs=stop\_grace\_period\_secs)
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/training/monitored\_session.py", line 795, in **init**
 stop\_grace\_period\_secs=stop\_grace\_period\_secs)
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/training/monitored\_session.py", line 518, in **init**
 self.\_sess = \_RecoverableSession(self.\_coordinated\_creator)
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/training/monitored\_session.py", line 981, in **init**
 \_WrappedSession.**init**(self, self.\_create\_session())
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/training/monitored\_session.py", line 986, in \_create\_session
 return self.\_sess\_creator.create\_session()
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/training/monitored\_session.py", line 675, in create\_session
 self.tf\_sess = self.\_session\_creator.create\_session()
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/training/monitored\_session.py", line 437, in create\_session
 self.\_scaffold.finalize()
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/training/monitored\_session.py", line 214, in finalize
 self.\_saver.build()
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1302, in build
 self.\_build(self.\_filename, build\_save=True, build\_restore=True)
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1339, in \_build
 build\_save=build\_save, build\_restore=build\_restore)
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 790, in \_build\_internal
 restore\_sequentially, reshape)
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 502, in \_AddShardedRestoreOps
 name="restore\_shard"))
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 449, in \_AddRestoreOps
 restore\_sequentially)
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 847, in bulk\_restore
 return io\_ops.restore\_v2(filename\_tensor, names, slices, dtypes)
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/ops/gen\_io\_ops.py", line 1030, in restore\_v2
 shape\_and\_slices=shape\_and\_slices, dtypes=dtypes, name=name)
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/framework/op\_def\_library.py", line 787, in \_apply\_op\_helper
 op\_def=op\_def)
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 3271, in create\_op
 op\_def=op\_def)
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1650, in **init**
 self.\_traceback = self.\_graph.\_extract\_stack() # pylint: disable=protected-access

NotFoundError (see above for traceback): Key dnn/hiddenlayer\_0/bias not found in checkpoint
 [[Node: save/RestoreV2 = RestoreV2[dtypes=[DT\_FLOAT, DT\_FLOAT, DT\_FLOAT, DT\_FLOAT, DT\_FLOAT, ..., DT\_FLOAT, DT\_FLOAT, DT\_FLOAT, DT\_FLOAT, DT\_INT64], \_device="/job:localhost/replica:0/task:0/device:CPU:0"](\_arg\_save/Const\_0\_0, save/RestoreV2/tensor\_names, save/RestoreV2/shape\_and\_slices)]]

After doing some print statements, I am sure the error is occurring on this line of code: 
classifier.train(input\_fn=input\_fn(training\_set),steps=1000)

I wonder if it has something to do with my Tensorflow Version, which is 1.6.  

Any help appreciated. Thanks.