Import tensorflow contrib learn python learn
It looks like you have an error in your import statement. Try
from tensorflow.contrib.learn import DNNClassifier
I am new to tensorflow. When I am using import tensorflow.contrib.learn.python.learn   for using the DNNClassifier it is giving me an error: module object has no attribute python 
Python version 3.4
Tensorflow 1.7.0