MCPcopy Index your code
hub / github.com/OpenDriveLab/ReSim / test_load

Function test_load

SwissArmyTransformer/tests/test_nested_model.py:53–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51 assert torch.allclose(a_p, b_p)
52
53def 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
60if __name__ == '__main__':

Callers

nothing calls this directly

Calls 1

from_pretrainedMethod · 0.45

Tested by

no test coverage detected