pumpikano / tf-dann

Domain-Adversarial Neural Network in Tensorflow
MIT License
628 stars 224 forks source link

Parameter selection #5

Closed saadirtza closed 7 years ago

saadirtza commented 7 years ago

Hi Pumpikano,

Once again thanks for reply quickly to my previous posts. i have two quick questions:

1- how to select the parameters to optimize the performance? e.g. in your code (MNIST) W_conv0 = weight_variable([5, 5, 3, 32]) b_conv0 = bias_variable([32]) h_conv0 = tf.nn.relu(conv2d(X_input, W_conv0) + b_conv0) h_pool0 = max_pool_2x2(h_conv0)

        W_conv1 = weight_variable([5, 5, 32, 48])
        b_conv1 = bias_variable([48])
        h_conv1 = tf.nn.relu(conv2d(h_pool0, W_conv1) + b_conv1)
        h_pool1 = max_pool_2x2(h_conv1)

        # The domain-invariant feature
        self.feature = tf.reshape(h_pool1, [-1, 7*7*48])

why did you select 7_7_48 to reshape? it should be factors of 2352, why?

2- TSNE is working properly in my ubuntu.. but when i run MNIST code, it didn't plot and not even give any error or warning. Please help if you know where to look in.

Many Thanks

Best Regards Saad

pumpikano commented 7 years ago

1) I reshape to 2352 because this is the size of h_pool1 - here I am flattening the tensor from [height, width, depth] dimensions to a single dimension. It is expressed as 7*7*48 to make clear the origin of that number: h_pool1 is 7 high, 7 wide, and 48 deep. 2) I'm sorry, I can't help you debug your system environment. I would try to see if you can plot some simple tests to be sure you have the necessary dependences for matplotlib. Checkout its website http://matplotlib.org/.

saadirtza commented 7 years ago

Thanks for the help..