saketd403 / Visualizing-and-Understanding-Convolutional-neural-networks

82 stars 33 forks source link

Change the units parameter of Dense in self.down_func to integer instead of tuple #2

Open hovinh opened 6 years ago

hovinh commented 6 years ago

Hi @saketd403 ,

Thank you for your wonderful work :)) However, there is a minor error in the class DDense (Feature+visualization+using+Deconvnets+in+Keras.ipynb) that I think you should fix. Specifically,

output = keras.layers.Dense(self.input_shape[1:], 
kernel_initializer=tf.constant_initializer(W), bias_initializer=tf.constant_initializer(b))(input)

should be changed to

output = keras.layers.Dense(self.input_shape[1],
kernel_initializer=tf.constant_initializer(W), bias_initializer=tf.constant_initializer(b))(input)

in the definition of self.down_func.

Vinh