title: name 'datasets' is not defined
body: <p>What is the problem here.It gives an error.I don't know what to do.I just copy past the code from a web tutorial.As for the error I can't go ahead.It says name 'datasets' is not defined :</p>
  
  <pre><code>from keras.models import Sequential
  from keras.layers import Conv2D
  from keras.layers import MaxPooling2D
  from keras.layers import Flatten
  from keras.layers import Dense
  import numpy as np
  import matplotlib.patches as mpatches
  import matplotlib.pyplot as plt
  from tensorflow.examples.tutorials.mnist import input_data
  
  import tensorflow as tf
  
  
  a = tf.truncated_normal([16,128,128,3])
  sess = tf.Session()
  sess.run(tf.initialize_all_variables())
  sess.run(tf.shape(a))
  
  
  3
  
  b=tf.reshape(a,[16,49152])
  sess.run(tf.shape(b))
  
  classes = ['dogs', 'cats']
  num_classes = len(classes)
  
  
  train_path='C:/Users/ZERO/Desktop/img test/cat vs dog/convnet-image-classifier-master/test/resources/images/training/'
  
  
  validation_size = 0.2
  
  # batch size
  batch_size = 16
  
  data = datasets.read_train_sets(train_path, img_size, classes, validation_size=validation_size)
  </code></pre>