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]])