//  [python]
def __call__(self, features, is_training):
        seqs_ids = features['seqs_i']  #

        # Perform embedding lookup on the word ids.
        seqs_units = self.item_embs(seqs_ids)

        # Add positional embeddings and token type embeddings, then layer
        # normalize and perform dropout.
        with tf.variable_scope("embeddings"):
            seqs_units += self.pcoding.code(seqs_units)
            seqs_units = layernorm(seqs_units)
            seqs_units = tf.layers.dropout(seqs_units, rate=self.hidden_dropout_rate, training=is_training)

        # This converts a 2D mask of shape [batch_size, seq_length] to a 3D
        # mask of shape [batch_size, seq_length, seq_length] which is used
        # for the attention scores.
        broadcast_ones = tf.expand_dims(tf.ones_like(seqs_ids, dtype=tf.float32), 2)
        key_masks = tf.expand_dims(tf.cast(tf.not_equal(seqs_ids, 0), tf.float32), 1)
        attention_masks = broadcast_ones * key_masks
        if self.num_heads != 1:
            attention_masks = tf.tile(attention_masks, [self.num_heads, 1, 1])

        # Run the stacked transformer.
        # `sequence_output` shape = [batch_size, seq_length, hidden_size].
        prev_outputs = seqs_units
        for i, attention in enumerate(self.list_attention):
            with tf.variable_scope("layer_%d" % i):
                layer_inputs = prev_outputs

                with tf.variable_scope("attention"):
                    with tf.variable_scope("self"):
                        attention_outs = attention(layer_inputs, layer_inputs, attention_masks, is_training)

                    # Run a linear projection of `hidden_size` then add a residual
                    # with `layer_input`.
                    with tf.variable_scope("output"):
                        attention_outs = tf.layers.dense(attention_outs, self.num_units)
                        attention_outs = tf.layers.dropout(attention_outs, rate=self.hidden_dropout_rate,
                                                           training=is_training)
                        attention_outs = layernorm(attention_outs + layer_inputs)

                # The activation is only applied to the "intermediate" hidden layer.
                with tf.variable_scope("intermediate"):
                    intermediate_outputs = tf.layers.dense(attention_outs, 2 * self.num_units,
                                                           activation=gelu)

                # Down-project back to `hidden_size` then add the residual.
                with tf.variable_scope("output"):
                    layer_outputs = tf.layers.dense(intermediate_outputs, self.num_units)
                    layer_outputs = tf.layers.dropout(layer_outputs, rate=self.hidden_dropout_rate,
                                                      training=is_training)
                    layer_outputs = layernorm(layer_outputs + attention_outs)
                    prev_outputs = layer_outputs

        seqs_outs = prev_outputs
        with tf.variable_scope("cls/predictions"):
            with tf.variable_scope("transform"):
                seqs_outs = tf.layers.dense(seqs_outs, self.num_units, activation=gelu)
                seqs_outs = layernorm(seqs_outs)

        if is_training:
            seqs_outs = tf.batch_gather(seqs_outs, features['masked_positions'])
            seqs_outs = tf.reshape(seqs_outs, [tf.shape(seqs_ids)[0] * self.masklen, self.num_units])
        else:
            # only using the latest representations for making predictions
            seqs_outs = tf.reshape(seqs_outs[:, -1], [tf.shape(seqs_ids)[0], self.num_units])

        # compute logits
        logits = tf.matmul(seqs_outs, self.item_embs.lookup_table, transpose_b=True)
        logits = tf.nn.bias_add(logits, self.output_bias)
        return logits