GithubHelp home page GithubHelp logo

Coral Problem about mann HOT 9 CLOSED

wzell avatar wzell commented on July 24, 2024
Coral Problem

from mann.

Comments (9)

wzell avatar wzell commented on July 24, 2024

Have you tried more than one epoch, different regularization parameters, re-initialization of environment?

from mann.

SherryJingxr avatar SherryJingxr commented on July 24, 2024

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.

wzell avatar wzell commented on July 24, 2024

(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.

SherryJingxr avatar SherryJingxr commented on July 24, 2024

(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.

wzell avatar wzell commented on July 24, 2024

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.

SherryJingxr avatar SherryJingxr commented on July 24, 2024

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:
image
where 12261 is the number of source data, 17807 is the number of target data.

from mann.

wzell avatar wzell commented on July 24, 2024

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.

SherryJingxr avatar SherryJingxr commented on July 24, 2024

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?
image

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.

wzell avatar wzell commented on July 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.