docstr: Sets the network weights from the given ParameterDict
  :param new_rate: ratio for adding new and old weight values: val=rate*weights + (1-rate)*old_weights
docstr_tok: ["Sets","the","network","weights","from","the","given","ParameterDict",":","param","new_rate",":","ratio","for","adding","new","and","old","weight","values",":","val=rate","*","weights","+","(","1-rate",")","*","old_weights"]
code: def set_weights(
      self, weights: gluon.ParameterDict, new_rate: float = 1.0
  ) -> None:
      """
      Sets the network weights from the given ParameterDict
      :param new_rate: ratio for adding new and old weight values: val=rate*weights + (1-rate)*old_weights
      """
      old_weights = self.model.collect_params()
      for name, p in weights.items():
          name = name[len(weights.prefix) :]  # Strip prefix
          old_p = old_weights[old_weights.prefix + name]  # Add prefix
          old_p.set_data(
              new_rate * p._reduce() + (1 - new_rate) * old_p._reduce()
          )
  
imports: import copy
  from typing import Any, Dict, Generator, List, Tuple, Union
  import numpy
  import mxnet
  from mxnet import autograd, gluon, nd
  from mxnet.ndarray import NDArray
  from rl_coach.architectures.architecture import Architecture
  from rl_coach.architectures.mxnet_components.heads.head import LOSS_OUT_TYPE_LOSS, LOSS_OUT_TYPE_REGULARIZATION
  from rl_coach.architectures.mxnet_components import utils
  from rl_coach.architectures.mxnet_components.savers import ParameterDictSaver, OnnxSaver
  from rl_coach.base_parameters import AgentParameters
  from rl_coach.logger import screen
  from rl_coach.saver import SaverCollection
  from rl_coach.spaces import SpacesDefinition
  from rl_coach.utils import force_list, squeeze_list
label_desc: Use image node_id 18 for calling the MxnetArchitecture obj's underlying member method code with example usage: obj.set_weights(weights, new_rate) without return types