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

Function test_create

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

Source from the content-addressed store, hash-verified

20 return old_impl(input_ids, **kw_args) + self.net(input_ids, input_ids,input_ids)
21
22def test_create():
23 a = NestedModel(args=NestedModel.get_args(num_layers=2,
24 bert_args={"hidden_size": 128, "num_layers": 3, 'num_types': 2}
25 ))
26 assert a.net.transformer.position_embeddings.weight.shape[-1] == 128
27
28def test_save_and_load():
29 args = NestedModel.get_args(

Callers 1

Calls 2

NestedModelClass · 0.85
get_argsMethod · 0.80

Tested by

no test coverage detected