Flax Regnet#21867
Conversation
|
The documentation is not available anymore as the PR was closed or merged. |
|
@sanchit-gandhi This is now ready for your review, thanks a lot for your time. |
sanchit-gandhi
left a comment
There was a problem hiding this comment.
Very nice PR @Shubhamai! Just some small code clean-up comments - the JAX/Flax logic looks sound! In general, we can try and use # Copied from statements in every place we copy code from Flax ResNet one-for-one.
|
|
||
| pooled_output = outputs.pooler_output if return_dict else outputs[1] | ||
|
|
||
| logits = self.classifier(pooled_output[:, :, 0, 0]) |
There was a problem hiding this comment.
Any reason we slice 0, 0 over the last two dims? Don't see this in the PyTorch code:
There was a problem hiding this comment.
No specific reason, since we are using # Copied from ... from resnet, this needs to be kept same.
|
@sanchit-gandhi All the requested changes have been made and looks ready for next iteration of review, thanks a lot for your time. |
There was a problem hiding this comment.
Very nice @Shubhamai - thanks for incorporating all of the comments from the Flax ResNet PR and the previous Flax RegNet review!
Looks ready for a final review!
| ) | ||
|
|
||
|
|
||
| # Copied from transformers.models.resnet.modeling_flax_resnet.FlaxResNetPreTrainedModel with ResNet->RegNet,resnet->regnet,RESNET->REGNET |
* initial commit * review changes * post model PR merge * updating doc
* initial commit * review changes * post model PR merge * updating doc
What does this PR do?
Flax Implementation of facebook/regnet-y-040
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.