newRep = setLearnableParameters(oldRep,val)
returns a new policy or value function representation, newRep, with the
same structure as the original representation, oldRep, and the
learnable parameter values specified in val.
oldRep — Original policy or value function representation rlValueRepresentation object | rlQValueRepresentation object | rlDeterministicActorRepresentation object | rlStochasticActorRepresentation object
Original policy or value function representation, specified as one of the
following:
To create a policy or value function representation, use one of the following
methods:
Create a representation using the corresponding representation object.
Obtain the existing value function representation from an agent using getCritic
Obtain the existing policy representation from an agent using getActor.
val — Learnable parameter values cell array
Learnable parameter values for the representation object, specified as a cell array.
The parameters in val must be compatible with the structure and
parameterization of oldRep.
To obtain a cell array of learnable parameter values from an existing
representation, which you can then modify, use the getLearnableParameters function.
newRep — New policy or value function representation rlValueRepresentation | rlQValueRepresentation | rlDeterministicActorRepresentation | rlStochasticActorRepresentation
New policy or value function representation, returned as a representation object of
the same type as oldRep. newRep has the same
structure as oldRep but with parameter values from
val.
setLearnableParameterValues is now setLearnableParameters
Behavior changed in R2020a
setLearnableParameterValues is now
setLearnableParameters. To update your code, change the function name
from setLearnableParameterValues to
setLearnableParameters. The syntaxes are equivalent.