code: def _trainable_setter(sess):
      def _set(p, raw_value, attr=None):
          if p.get_shape() != raw_value.shape:
              v = raw_value.reshape(p.get_shape())
          else:
              v = raw_value
          tf.assign(p, v).eval(session=sess)
  
      return _set
  
imports: import tensorflow
  import numpy
  from cntk.contrib import crosstalk
label_desc: Use image node_id 2 for calling a global function with example usage: _trainable_setter(sess) and returns: _set