hadyelsahar / CNN-RelationExtraction

Convolution neural network for relation extraction between two given entities
178 stars 59 forks source link

Error example cnn-mnist #3

Open Diego999 opened 8 years ago

Diego999 commented 8 years ago

Hey,

I try to run the cnn-mnist but I got the following error :

⇒ python mnist_example.py Successfully downloaded train-images-idx3-ubyte.gz 9912422 bytes. Extracting MNIST_data/train-images-idx3-ubyte.gz Successfully downloaded train-labels-idx1-ubyte.gz 28881 bytes. Extracting MNIST_data/train-labels-idx1-ubyte.gz Successfully downloaded t10k-images-idx3-ubyte.gz 1648877 bytes. Extracting MNIST_data/t10k-images-idx3-ubyte.gz Successfully downloaded t10k-labels-idx1-ubyte.gz 4542 bytes. Extracting MNIST_data/t10k-labels-idx1-ubyte.gz Traceback (most recent call last): File "mnist_example.py", line 26, in cnn = CNN(input_shape=[28, 28, 1], classes=classes, conv_shape=[5, 5]) File "../../CNN.py", line 107, in init self.train_step = tf.train.AdagradOptimizer(1e-3).minimize(cross_entropy) File "/Users/Diego/tensorflow/lib/python2.7/site-packages/tensorflow/python/training/optimizer.py", line 198, in minimize name=name) File "/Users/Diego/tensorflow/lib/python2.7/site-packages/tensorflow/python/training/optimizer.py", line 300, in apply_gradients self._create_slots(var_list) File "/Users/Diego/tensorflow/lib/python2.7/site-packages/tensorflow/python/training/adagrad.py", line 65, in _create_slots dtype=v.dtype.base_dtype) File "/Users/Diego/tensorflow/lib/python2.7/site-packages/tensorflow/python/framework/constant_op.py", line 163, in constant tensor_util.make_tensor_proto(value, dtype=dtype, shape=shape)) File "/Users/Diego/tensorflow/lib/python2.7/site-packages/tensorflow/python/framework/tensor_util.py", line 395, in make_tensor_proto shape = [int(dim) for dim in shape] TypeError: int returned non-int (type NoneType)

Did you do something special to make it work ? Thanks