b9b54d4f30ff65cf1c54dc0cf90c938b48c44f90,reagent/test/models/test_bcq.py,TestBCQ,test_forward_pass,#TestBCQ#,58

Before Change


        input = PreprocessedState.from_tensor(state=torch.tensor([[2.0]]))
        bcq_drop_threshold = 0.20
        embedding = FullyConnectedNetwork(layers=[state_dim, 2], activations=["relu"])
        imitator_network = FullyConnectedDQN(action_dim=action_dim, embedding=embedding)

        // Set weights of imitator network to make it deterministic
        im_net_layer_0_w = torch.tensor([[1.2], [0.9]])
        imitator_network.state_dict()["embedding.layers.0.weight"].data.copy_(

After Change


        q_network.state_dict()["fc.layers.1.bias"].data.copy_(q_net_layer_1_b)

        imitator_network = FullyConnectedNetwork(
            layers=[state_dim, 2, action_dim], activations=["relu", "linear"]
        )
        // Set weights of imitator network to make it deterministic
        im_net_layer_0_w = torch.tensor([[1.2], [0.9]])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: facebookresearch/Horizon
Commit Name: b9b54d4f30ff65cf1c54dc0cf90c938b48c44f90
Time: 2020-04-28
Author: kittipat@fb.com
File Name: reagent/test/models/test_bcq.py
Class Name: TestBCQ
Method Name: test_forward_pass


Project Name: facebookresearch/Horizon
Commit Name: b9b54d4f30ff65cf1c54dc0cf90c938b48c44f90
Time: 2020-04-28
Author: kittipat@fb.com
File Name: reagent/test/models/test_bcq.py
Class Name: TestBCQ
Method Name: test_save_load


Project Name: facebookresearch/Horizon
Commit Name: b9b54d4f30ff65cf1c54dc0cf90c938b48c44f90
Time: 2020-04-28
Author: kittipat@fb.com
File Name: reagent/test/models/test_bcq.py
Class Name: TestBCQ
Method Name: test_basic