def __call__(self, s, visual_s, cell_state, *, need_split=False):
    '\n        params:\n            s: [B*T, x]\n            visual_s: [B*T, y]\n            cell_state: Tuple([B, z],)\n        return:\n            feat: [B, a]\n            cell_state: Tuple([B, z],)\n        '
    batch_size = tf.shape(s)[0]
    if self.memory_net.use_rnn:
        s = tf.reshape(s, [(- 1), tf.shape(s)[(- 1)]])
        if self.visual_net.use_visual:
            visual_s = tf.reshape(visual_s, [(- 1), *tf.shape(visual_s)[2:]])
    feat = self.get_encoder_feature(s, visual_s)
    if self.memory_net.use_rnn:
        feat = tf.reshape(feat, (batch_size, (- 1), tf.shape(feat)[(- 1)]))
        (feat, cell_state) = self.memory_net(feat, *cell_state)
        feat = tf.reshape(feat, ((- 1), tf.shape(feat)[(- 1)]))
    if need_split:
        feat = self.split(batch_size, feat)
    return (feat, cell_state)
params:
    s: [B*T, x]
    visual_s: [B*T, y]
    cell_state: Tuple([B, z],)
return:
    feat: [B, a]
    cell_state: Tuple([B, z],)
def __call__(self, s, visual_s, cell_state, *, need_split=False):
    '\n        params:\n            s: [B*T, x]\n            visual_s: [B*T, y]\n            cell_state: Tuple([B, z],)\n        return:\n            feat: [B, a]\n            cell_state: Tuple([B, z],)\n        '
    batch_size = tf.shape(s)[0]
    if self.memory_net.use_rnn:
        s = tf.reshape(s, [(- 1), tf.shape(s)[(- 1)]])
        if self.visual_net.use_visual:
            visual_s = tf.reshape(visual_s, [(- 1), *tf.shape(visual_s)[2:]])
    feat = self.get_encoder_feature(s, visual_s)
    if self.memory_net.use_rnn:
        feat = tf.reshape(feat, (batch_size, (- 1), tf.shape(feat)[(- 1)]))
        (feat, cell_state) = self.memory_net(feat, *cell_state)
        feat = tf.reshape(feat, ((- 1), tf.shape(feat)[(- 1)]))
    if need_split:
        feat = self.split(batch_size, feat)
    return (feat, cell_state)