Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How is the code implemented on the fully labeled source data? #10

Open
zhouyaqian666 opened this issue Nov 2, 2022 · 6 comments
Open

Comments

@zhouyaqian666
Copy link

Thank you very much for sharing the code! I have a problem that how is the code implemented by using full source labels?

@zhengzangw
Copy link
Owner

You can use all source labels by using the data split file without the suffix '_labeled_xx'. For example, there is a txt file 'amazon.txt' containing all label information.

@zhouyaqian666
Copy link
Author

You can use all source labels by using the data split file without the suffix '_labeled_xx'. For example, there is a txt file 'amazon.txt' containing all label information.

Sorry, I didn't quite understand. If I use this file“amazon.txt”, it's obviously incorrect to execute this command "CUDA_VISIBLE_DEVICES=0,1 python pcs/run.py --config config/office/D-A-1.json".
Besides, if it is necessary to modify the code in the program?

@zhengzangw
Copy link
Owner

I read the code again and find https://github.com/zhengzangw/PCS-FUDA/blob/master/pcs/agents/CDSAgent.py#L168, if the fewshot is None, then all should be used. Maybe you can try setting fewshot=None. (You can modify the config file to achieve this).

If this does not work, you can rename the 'amazon.txt' to 'amazon_labeled_999' (999 is a nonsense word). And pass the 999 to the fewshot number. This hard-coded way can work, too, I think.

@zhouyaqian666
Copy link
Author

我又看了一遍代码,发现https://github.com/zhengzangw/PCS-FUDA/blob/master/pcs/agents/CDSAgent.py#L168,如果fewshot是None,那么应该全部使用。也许你可以尝试设置fewshot=None。(您可以修改配置文件来实现此目的)。

如果这不起作用,您可以将“amazon.txt”重命名为“amazon_labeled_999”(999 是一个无意义的词)。并将 999 传递给少数人。我认为这种硬编码方式也可以工作。

I have tried the above ways. If the fewshot is None, it does not work. So we set the fewshot number to 500, but it shows the following error" RuntimeError: cannot perform reduction function max on tensor with no elements because the operation does not have an identity." This is very distressing to me.

@zhengzangw
Copy link
Owner

This is strange. Do you rename the file in data/split/office? As I remembered, it is not hard to conduct full label training based on the released code. If you still cannot run the full label setting, I can come back to you after the CVPR deadline.

@zhouyaqian666
Copy link
Author

This is strange. Do you rename the file in data/split/office? As I remembered, it is not hard to conduct full label training based on the released code. If you still cannot run the full label setting, I can come back to you after the CVPR deadline.

Thanks, I'll think again about how to solve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants