620d2c767c309327aa04210192b08f1c1fd0de76,reagent/test/models/test_bcq.py,TestBCQ,test_forward_pass,#TestBCQ#,61

Before Change


        bcq_drop_threshold = 0.20

        q_network = FullyConnectedDQN(
            state_dim, action_dim, sizes=[2], activations=["relu"]
        )
        // Set weights of q-network to make it deterministic
        q_net_layer_0_w = torch.tensor([[1.2], [0.9]])

After 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_(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


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


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


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