message: Add initialization value parameter for trainable tf.contrib.layers.spatial_softmax temperature
diff: @@ -2674,15 +2674,24 @@ def spatial_softmax(features,
  indexing='ij')
  pos_x = array_ops.reshape(pos_x, [height * width])
  pos_y = array_ops.reshape(pos_y, [height * width])
  +
  if temperature is None:
  - temperature_collections = utils.get_variable_collections(
  + temp_initializer = init_ops.ones_initializer()
  + else:
  + temp_initializer = init_ops.constant_initializer(temperature)
  +
  + if not trainable:
  + temp_collections = None
  + else:
  + temp_collections = utils.get_variable_collections(
  variables_collections, 'temperature')
  +
  temperature = variables.model_variable(
  'temperature',
  shape=(),
  dtype=dtypes.float32,
  - initializer=init_ops.ones_initializer(),
  - collections=temperature_collections,
  + initializer=temp_initializer,
  + collections=temp_collections,
  trainable=trainable)
  if data_format == 'NCHW':
  features = array_ops.reshape(features, [-1, height * width])
  