()
| 51 | assert torch.allclose(a_p, b_p) |
| 52 | |
| 53 | def test_load(): |
| 54 | trained_dir = './checkpoints/test_train_nested/MyModel-05-11-01-35' |
| 55 | |
| 56 | b, args = NestedModel.from_pretrained(trained_dir) |
| 57 | assert b.net.transformer.position_embeddings.weight.shape[-1] == 128 |
| 58 | |
| 59 | |
| 60 | if __name__ == '__main__': |
nothing calls this directly
no test coverage detected