class_docstr: Variable that is (defaults to being) shared between functions that
  it appears in.
  
  Parameters
  ----------
  name : str
      The name for this variable (see `Variable`).
  type : str
      The type for this variable (see `Variable`).
  value
      A value to associate with this variable (a new container will be
      created).
  strict
      True : assignments to .value will not be cast or copied, so they must
      have the correct type.
  allow_downcast
      Only applies if `strict` is False.
      True : allow assigned value to lose precision when cast during
      assignment.
      False : never allow precision loss.
      None : only allow downcasting of a Python float to a scalar floatX.
  container
      The container to use for this variable. Illegal to pass this as well as
      a value.
  
  Notes
  -----
  For more user-friendly constructor, see `shared`.
class_docstr_tok: ["Variable","that","is","(","defaults","to","being",")","shared","between","functions","that","it","appears","in",".","Parameters","--","--","--","--","--","name",":","str","The","name","for","this","variable","(","see","`","Variable","`",")",".","type",":","str","The","type","for","this","variable","(","see","`","Variable","`",")",".","value","A","value","to","associate","with","this","variable","(","a","new","container","will","be","created",")",".","strict","True",":","assignments","to",".value","will","not","be","cast","or","copied",",","so","they","must","have","the","correct","type",".","allow_downcast","Only","applies","if","`","strict","`","is","False",".","True",":","allow","assigned","value","to","lose","precision","when","cast","during","assignment",".","False",":","never","allow","precision","loss",".","None",":","only","allow","downcasting","of","a","Python","float","to","a","scalar","floatX",".","container","The","container","to","use","for","this","variable",".","Illegal","to","pass","this","as","well","as","a","value",".","Notes","--","--","-","For","more","user-friendly","constructor",",","see","`","shared","`","."]
docstr: Set the non-symbolic value associated with this SharedVariable.
  
  Parameters
  ----------
  borrow : bool
      True to use the new_value directly, potentially creating problems
      related to aliased memory.
  
  Changes to this value will be visible to all functions using
  this SharedVariable.
  
  Notes
  -----
  Set_value will work in-place on the GPU, if
  the following conditions are met:
  
      * The destination on the GPU must be c_contiguous.
      * The source is on the CPU.
      * The old value must have the same dtype as the new value
        (which is a given for now, since only float32 is
        supported).
      * The old and new value must have the same shape.
      * The old value is being completely replaced by the new
        value (not partially modified, e.g. by replacing some
        subtensor of it).
  
  It is also worth mentioning that, for efficient transfer to the GPU,
  Theano will make the new data ``c_contiguous``. This can require an
  extra copy of the data on the host.
  
  The inplace on gpu memory work when borrow is either True or False.
docstr_tok: ["Set","the","non-symbolic","value","associated","with","this","SharedVariable",".","Parameters","--","--","--","--","--","borrow",":","bool","True","to","use","the","new_value","directly",",","potentially","creating","problems","related","to","aliased","memory",".","Changes","to","this","value","will","be","visible","to","all","functions","using","this","SharedVariable",".","Notes","--","--","-","Set_value","will","work","in-place","on","the","GPU",",","if","the","following","conditions","are","met",":","*","The","destination","on","the","GPU","must","be","c_contiguous",".","*","The","source","is","on","the","CPU",".","*","The","old","value","must","have","the","same","dtype","as","the","new","value","(","which","is","a","given","for","now",",","since","only","float32","is","supported",")",".","*","The","old","and","new","value","must","have","the","same","shape",".","*","The","old","value","is","being","completely","replaced","by","the","new","value","(","not","partially","modified",",","e.g",".","by","replacing","some","subtensor","of","it",")",".","It","is","also","worth","mentioning","that",",","for","efficient","transfer","to","the","GPU",",","Theano","will","make","the","new","data","``","c_contiguous","``",".","This","can","require","an","extra","copy","of","the","data","on","the","host",".","The","inplace","on","gpu","memory","work","when","borrow","is","either","True","or","False","."]
code: def set_value(self, new_value, borrow=False):
      """
      Set the non-symbolic value associated with this SharedVariable.
  
      Parameters
      ----------
      borrow : bool
          True to use the new_value directly, potentially creating problems
          related to aliased memory.
  
      Changes to this value will be visible to all functions using
      this SharedVariable.
  
      Notes
      -----
      Set_value will work in-place on the GPU, if
      the following conditions are met:
  
          * The destination on the GPU must be c_contiguous.
          * The source is on the CPU.
          * The old value must have the same dtype as the new value
            (which is a given for now, since only float32 is
            supported).
          * The old and new value must have the same shape.
          * The old value is being completely replaced by the new
            value (not partially modified, e.g. by replacing some
            subtensor of it).
  
      It is also worth mentioning that, for efficient transfer to the GPU,
      Theano will make the new data ``c_contiguous``. This can require an
      extra copy of the data on the host.
  
      The inplace on gpu memory work when borrow is either True or False.
  
      """
      if borrow:
          self.container.value = new_value
      else:
          self.container.value = copy.deepcopy(new_value)
  
file_path: Theano/theano/compile/sharedvalue.py
imports: from __future__ import absolute_import, print_function, division
  import copy
  import logging
  import numpy
  from theano.gof import Container, Variable, generic, utils
label_desc: Use image node_id 3 for calling the SharedVariable obj's underlying member method code with example usage: obj.set_value(new_value, borrow) without return types