parameters: (self, other)
docstring: Copy the information of parameters from the other block.
  
          Args:
              other(Block): the other block.
  
          Raises:
              ValueError: If type of input is not Block, or the `other` and this
                  block is not in the same topology.
  
          Returns:
              None
docstring_summary: Copy the information of parameters from the other block.
docstring_tokens: Copy the information of parameters from the other block .
function: def _copy_param_info_from(self, other):
          """
          Copy the information of parameters from the other block.
  
          Args:
              other(Block): the other block.
  
          Raises:
              ValueError: If type of input is not Block, or the `other` and this
                  block is not in the same topology.
  
          Returns:
              None
          """
          if not isinstance(other, Block):
              raise TypeError(
                  "_copy_param_info_from should be invoked with Block")
          for p in other.iter_parameters():
              assert isinstance(p, Parameter)
              v = self.vars.get(p.name, None)
              if v is None:
                  # if the Parameter is pruned, v may be None
                  continue
              assert isinstance(v, Variable)
              new_p = None
              if in_dygraph_mode():
                  new_p = ParamBase(
                      shape=v.shape,
                      dtype=v.dtype,
                      type=v.type,
                      lod_level=v.lod_level,
                      stop_gradient=p.stop_gradient,
                      trainable=p.trainable,
                      optimize_attr=p.optimize_attr,
                      regularizer=p.regularizer,
                      error_clip=p.error_clip,
                      name=v.name)
              else:
                  new_p = Parameter(
                      block=self,
                      shape=v.shape,
                      dtype=v.dtype,
                      type=v.type,
                      lod_level=v.lod_level
                      if v.type == core.VarDesc.VarType.LOD_TENSOR else None,
                      stop_gradient=p.stop_gradient,
                      trainable=p.trainable,
                      optimize_attr=p.optimize_attr,
                      regularizer=p.regularizer,
                      error_clip=p.error_clip,
                      name=v.name)
              self.vars[new_p.name] = new_p
function_tokens: def _copy_param_info_from ( self , other ) : if not isinstance ( other , Block ) : raise TypeError ( "_copy_param_info_from should be invoked with Block" ) for p in other . iter_parameters ( ) : assert isinstance ( p , Parameter ) v = self . vars . get ( p . name , None ) if v is None : # if the Parameter is pruned, v may be None continue assert isinstance ( v , Variable ) new_p = None if in_dygraph_mode ( ) : new_p = ParamBase ( shape = v . shape , dtype = v . dtype , type = v . type , lod_level = v . lod_level , stop_gradient = p . stop_gradient , trainable = p . trainable , optimize_attr = p . optimize_attr , regularizer = p . regularizer , error_clip = p . error_clip , name = v . name ) else : new_p = Parameter ( block = self , shape = v . shape , dtype = v . dtype , type = v . type , lod_level = v . lod_level if v . type == core . VarDesc . VarType . LOD_TENSOR else None , stop_gradient = p . stop_gradient , trainable = p . trainable , optimize_attr = p . optimize_attr , regularizer = p . regularizer , error_clip = p . error_clip , name = v . name ) self . vars [ new_p . name ] = new_p