Conversation
kprokofi
left a comment
There was a problem hiding this comment.
first bunch of comments
| for (k, v) in loss_decode_u.items(): | ||
| if v is None: | ||
| continue | ||
| losses[k] = (loss_decode[k] + loss_decode_u[k]*self.unsup_weight) |
There was a problem hiding this comment.
losses[k] = {k : loss_decode[k] + v*self.unsup_weight for k,v in loss_decode_u.items() is v is not None}
BTW, loss is dict, because we can have several losses?
maybe we can add unlabeled data to _decode_head_forward_train and modify this function?
There was a problem hiding this comment.
I think this code implementation is more intuitive than dict comprehension.
kprokofi
left a comment
There was a problem hiding this comment.
Second bunch of comments
| from mpa.utils.data_cpu import MMDataCPU | ||
|
|
||
|
|
||
| def set_random_seed(seed, deterministic=False): |
There was a problem hiding this comment.
(I know that it is not your code, but it is something that I noticed) This function doesn't use anywhere, even more we have set_random_seed in Stage.py based on the config. Let's delete it.
There was a problem hiding this comment.
Can I refactor the codes inside stage.py in the next PR? This PR scope is separating the stage.py config with semisl.
|
@jaegukhyun @kprokofi @JihwanEom I revised codes based on your reviews. I request you to review again. I resolved your comments. If you need to add comments or still have a questions to resolved question, unresolve it or add some. |
This PR includes
TODOs