def _variable_on_cpu(name, shape, initializer):
 with tf.device('/cpu:0'):
  dtype = (tf.float16 if FLAGS.use_fp16 else tf.float32)
  var = tf.get_variable(name, shape, initializer=initializer, dtype=dtype)
 return var

def _variable_on_cpu ( name , shape , initializer ) : with tf . device ( '/cpu:0' ) : dtype = ( tf . float16 if FLAGS . use_fp16 else tf . float32 ) var = tf . get_variable ( name , shape , initializer = initializer , dtype = dtype ) return var
helper to create a variable stored on cpu memory .