I First defined the pytorch Module:
class ActorCriticNetwork(nn.Module): def __init__(self, lr, input_dims, n_actions, fc1_dims=256, fc2_dims=256): su