original_docstring: The main function to create user encoder of NRMS.
  
          Args:
              titleencoder (object): the news encoder of NRMS.
  
          Return:
              object: the user encoder of NRMS.
          
docstring: The main function to create user encoder of NRMS.
docstring_tokens: The main function to create user encoder of NRMS .
code: def _build_userencoder(self, titleencoder):
          """The main function to create user encoder of NRMS.
  
          Args:
              titleencoder (object): the news encoder of NRMS.
  
          Return:
              object: the user encoder of NRMS.
          """
          hparams = self.hparams
          his_input_title = keras.Input(
              shape=(hparams.his_size, hparams.title_size), dtype="int32"
          )
  
          click_title_presents = layers.TimeDistributed(titleencoder)(his_input_title)
          y = SelfAttention(hparams.head_num, hparams.head_dim, seed=self.seed)(
              [click_title_presents] * 3
          )
          user_present = AttLayer2(hparams.attention_hidden_dim, seed=self.seed)(y)
  
          model = keras.Model(his_input_title, user_present, name="user_encoder")
          return model
code_tokens: def _build_userencoder ( self , titleencoder ) : hparams = self . hparams his_input_title = keras . Input ( shape = ( hparams . his_size , hparams . title_size ) , dtype = "int32" ) click_title_presents = layers . TimeDistributed ( titleencoder ) ( his_input_title ) y = SelfAttention ( hparams . head_num , hparams . head_dim , seed = self . seed ) ( [ click_title_presents ] * 3 ) user_present = AttLayer2 ( hparams . attention_hidden_dim , seed = self . seed ) ( y ) model = keras . Model ( his_input_title , user_present , name = "user_encoder" ) return model
short_docstring: The main function to create user encoder of NRMS.
short_docstring_tokens: The main function to create user encoder of NRMS .
comment: """The main function to create user encoder of NRMS.
  
          Args:
              titleencoder (object): the news encoder of NRMS.
  
          Return:
              object: the user encoder of NRMS.
          """