GRDA icon indicating copy to clipboard operation
GRDA copied to clipboard

A question about g_encode and GNet

Open ChloeKiwi opened this issue 3 years ago • 5 comments

Hello,I am a student learning about this excellent paper, it's truely an extrodinary work. But when I learn the source code, I find it's difficult for me to understand the opt.use_g_encode = False and Class GNet. What do they mean? Could you please share about it? Thanks so much!

ChloeKiwi avatar May 06 '22 01:05 ChloeKiwi

Hi ChloeKiwi,

Essentially, GNet provides domain embeddings for the encoder. The domain embedding serves as an identity of each domain, while also contains domain graph information (it is trained with the domain graph). "use_g_encode" decides whether we will use the pretrained domain embedding ("True" for using the pretrained embedding). The domain embedding can be pretrained or trained with the pipeline together. I will add some comments for this part.

shsjxzh avatar May 07 '22 03:05 shsjxzh

Hi ChloeKiwi,

Essentially, GNet provides domain embeddings for the encoder. The domain embedding serves as an identity of each domain, while also contains domain graph information (it is trained with the domain graph). "use_g_encode" decides whether we will use the pretrained domain embedding ("True" for using the pretrained embedding). The domain embedding can be pretrained or trained with the pipeline together. I will add some comments for this part.

Thanks a lot ! I am so sorry that I saw it just now.😥 And may I ask why it only sample several nodes to train the discriminator instead of all nodes?

ChloeKiwi avatar May 12 '22 15:05 ChloeKiwi

Because we found that this can provide better performance compared with sampling all the nodes. You can also test it by adjusting the sample numbers in "opt.sample_v".

shsjxzh avatar May 12 '22 17:05 shsjxzh

How to train DomainGraph with another dataset? MNIST... Use similarity?

cht619 avatar Sep 07 '22 08:09 cht619

Hi cht619,

Yes, you can use similarity to construct a graph. To use GRDA, you should have a pre-defined domain graph first. For instance, when you adapt the weather prediction model between states in USA, you can use the USA map as the graph; for MNIST, may be you can construct a graph based on similarities between number "1" to "9" (assuming each number forms a domain).

shsjxzh avatar Sep 08 '22 15:09 shsjxzh