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_(