Implemented Roberta Model - #65
Conversation
|
@juliagsy I am ready for review |
juliagsy
left a comment
There was a problem hiding this comment.
Hey! Thanks for the great work so far! On top of the comments, please also populate the __init__.py files so that imports are working correctly, thanks!
|
@juliagsy I have implemented the required changes and completed the testing |
| use_cache=None, | ||
| output_attentions=None, | ||
| ): | ||
| if input_ids[:, 0].sum().item() != 0: |
There was a problem hiding this comment.
should be to_scalar instead of item
| import pytest | ||
| import numpy as np | ||
| from ivy_models import roberta_base | ||
|
|
There was a problem hiding this comment.
could you please quickly ref test_alexnet and make the model object init happen once only for saving ci resources, thanks!
| if load_weights: | ||
| ref_logits_path = os.path.join(this_dir, "roberta_pooled_output.npy") | ||
| ref_logits = np.load(ref_logits_path) | ||
| assert np.allclose(ref_logits, ivy.to_numpy(logits), rtol=0.005, atol=0.005) |
There was a problem hiding this comment.
the value tests are unfortunately not passing when I checked, could you please verify this again?
also, could you please do me a favour and update the load_transformers_weights helper to not use copy.deepcopy and do old_mapping = model.v directly? it's somewhere line 174 in the weights_helpers.py file, thanks!
No description provided.