tf-dann
tf-dann copied to clipboard
Domain-Adversarial Neural Network in Tensorflow
Since tensorflow 1.7 there is a new way to redefine the gradient. ```python @tf.custom_gradient def flip_grad_layer(x, l): def grad(dy): return tf.negative(dy) * l, None return tf.identity(x), grad ```
Hello, Great implementation, thanks for sharing! I'd like to save the trained model. Do you have an idea of the simplest way to do this? I have tried with pickle...
how to set l from grad(x, l)? what it means when i is bigger?
Hey, First of all thanks a lot for this. I was wondering whether there is an easy way to make the gradient flipping work in Keras. [Someone](https://github.com/fchollet/keras/issues/3119) has done it...
Hi, I have changed this project in order to try domain adversarial learning in a regression problem. actually, I replaced the label predictor with a regressor. But it just makes...
I am trying to implement DANN for cross-domain sentiment classification (CDSC), which is also reported in the host paper. However, it seems that there is not a specific ipynb file...
In the paper, "While the parameters of the classifiers are optimized in order to minimize their error on the training set, the parameters of the underlying deep feature mapping are...
Hello, Thanks for sharing this code! I have couple of question, more theoretical then practical :) When I run MNIST example for 86000 steps (10 times more then original), I...
Suppose we have 3 sources domain and 1 target domain. How should I train DANN in this case? Should I combine all the 3 sources into only 1 source or...
Hi, first off thank you for the wonderful code. I am trying to replicate the toy blob example in pytorch. I am finding that it unreliably converges to the same...