Comments (9)
Have you tried more than one epoch, different regularization parameters, re-initialization of environment?
from mann.
Have you tried more than one epoch, different regularization parameters, re-initialization of environment?
I'm very sorry, is the epoch adjusted by the MAX_N_EPOCH parameter in the first picture? And how to realise re-initialization of environment?
from mann.
(a) Yes, it is. (b) Re-initialization of environment depends on your versions of software libraries, e.g. use https://www.tensorflow.org/api_docs/python/tf/keras/backend/clear_session for newer version of keras. The point is to make sure that the second model does not depend on the first one, but it is a new (keras) model.
from mann.
(a) Yes, it is. (b) Re-initialization of environment depends on your versions of software libraries, e.g. use https://www.tensorflow.org/api_docs/python/tf/keras/backend/clear_session for newer version of keras. The point is to make sure that the second model does not depend on the first one, but it is a new (keras) model.
I tried the methods you mentioned, changed the epoch to 1000 times, and re-initialized the environment, but the final result is still the same, the statement that I tried to print in the third picture is still not printed, this is normal?
from mann.
Yes, not-in-time-executed numpy code in theano/tensorflow functions executed by old keras version, can happen.
Did you try to increase the regularization parameter to 1000? To see if your own data (scaling) needs different parametrization..
Another question: does the simple example https://github.com/wzell/mann/blob/master/artificial_example.py work?
from mann.
First of all, thank you very much for your patient help!
I just tried to run artificial_example.py with keras2.0.
First of all, it reported an error in the neural_network function, it should be a version problem because there is no merge function in 2.0 version, I replaced
dense_s_t = merge([encoded_s,encoded_t], mode='concat', concat_axis=1)
with
dense_s_t = Concatenate()([encoded_s, encoded_t])
Then report:
where 12261 is the number of source data, 17807 is the number of target data.
from mann.
Nice spot with the version problem :-).
This seems to be because the zeros in line 215 are obtained from the shape of source sample. I suggest to exclude some target data so that the batches have the same size, and, then to try again. Later, if you find the method useful, you can solve this issue that arises from your data.
from mann.
Nice spot with the version problem :-). This seems to be because the zeros in line 215 are obtained from the shape of source sample. I suggest to exclude some target data so that the batches have the same size, and, then to try again. Later, if you find the method useful, you can solve this issue that arises from your data.
Sorry to bother you again!
I would like to know how to evaluate the accuracy on the target domain at the end? By running the accuracy function?
I ran the accuracy function and got a result, about 0.5, and the accuracy of the source domain also drops
But I passed the model through the model.evaluate function that comes with keras 2.0, and the accuracy I got was extremely low, only 0.19. Did I make a mistake?
from mann.
Unfortunately, it is very hard for me to help without knowing anything about your data. I just can remark that the regularization weight has ussually a very high influence on the accuracy.
Since we were able to figure out the problem of the CORAL-loss, I allow myself to close this issue.
from mann.
Related Issues (7)
- ValueError: negative dimensions are not allowed in object_recognition.py HOT 8
- CORAL Implementation HOT 2
- Sentiment analysis - val_pred_acc_1 HOT 6
- Error running in Keras and TensorFlow with CORAL HOT 2
- Need to call `set_layer` on ActivityRegularizer instance before calling the instance HOT 2
- MMD HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mann.