class_docstr: Tests parameterized embedder.
      
class_docstr_tok: ["Tests","parameterized","embedder","."]
docstr: Tests the correctness of using soft ids.
          
docstr_tok: ["Tests","the","correctness","of","using","soft","ids","."]
code: def test_word_embedder_soft_ids(self):
      """Tests the correctness of using soft ids."""
      init_value = np.expand_dims(np.arange(5), 1)
      embedder = WordEmbedder(init_value=init_value)
  
      ids = np.array([3])
      soft_ids = np.array([[0, 0, 0, 1, 0]])
  
      outputs = embedder(ids=ids)
      soft_outputs = embedder(soft_ids=soft_ids)
  
      with self.test_session() as sess:
          sess.run(tf.global_variables_initializer())
          outputs_, soft_outputs_ = sess.run([outputs, soft_outputs])
          self.assertEqual(outputs_, soft_outputs_)
  
file_path: texar/tests/modules/embedders/embedders_test.py
imports: import numpy
  import tensorflow
  from texar.tf.modules.embedders.embedders import WordEmbedder
  from texar.tf.modules.embedders.position_embedders import PositionEmbedder
  from texar.tf.context import global_mode
label_desc: Use image node_id 5 for calling the EmbedderTest obj's underlying member method code with example usage: obj.test_word_embedder_soft_ids() without return types