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

MPavg and MPmin #5

Open
huanmofazong opened this issue Nov 9, 2020 · 6 comments
Open

MPavg and MPmin #5

huanmofazong opened this issue Nov 9, 2020 · 6 comments

Comments

@huanmofazong
Copy link

Hello, I would like to know which part of the code I should modify if I want to reproduce MPavg and MPmin?

@Openning07
Copy link
Owner

Primarily, you should change the data directory of AVA and make sure the environment is prepared to reproduce the claimed results in my paper. Please read the Note and one example code for details. I also upload my checkpoint files in ** MyCheckpoint** folder.

@huanmofazong
Copy link
Author

@Openning07 Thank you for your reply. I configured the environment and changed the path of the dataset to run your code.
But it should be MPada. I would like to ask which part of the code should be modified if I want to reproduce MPavg and MPmin.

@Openning07
Copy link
Owner

Openning07 commented Nov 9, 2020

The core difference is the weights_JensenFactor in function compute_loss_and_error. If you want to change MPada to other two modes, please change the implementation of weights_JensenFactor: for MPavg, weights_JensenFactor is a vector [1, 1, ..., 1]; for MPmin, weights_JensenFactor is an one-hot vector where 1 indicates the bit of minimum confidence.

@huanmofazong
Copy link
Author

huanmofazong commented Nov 10, 2020

@Openning07 Thank you for your reply. I would like to ask if the value of --JensenFactor should be set to 0.5 during training?

@Openning07
Copy link
Owner

Yes. I used 0.5 for JensenFactor when MPada mode is selected.

@huanmofazong
Copy link
Author

huanmofazong commented Nov 12, 2020

@Openning07 For MPmin,you said weights_JensenFactor is an one-hot vector where 1 indicates the bit of minimum confidence.May I ask which Tensor I should use, I try to use target_p,But that doesn't seem right.
`weights_JensenFactor_old = tf.zeros_like(target_p, dtype='float32')

weight_index = tf.argmin(target_p, axis=0)

index = tf.cast(weight_index, dtype='int32')

weight_a = weights_JensenFactor_old[:index]

weight_b = tf.constant([1.], dtype='float32')

weight_c = weights_JensenFactor_old[index+1:]

weights_JensenFactor = tf.concat([weight_a, weight_b, weight_c], axis=0)`

Is this the right weights_JensenFactor?Thank you for your reply.

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