getLogitsAndActions(inputs) {
    return tf.tidy(() => {
      const logits = this.policyNet.predict(inputs);

      // Get the probability of the leftward action.
      const leftProb = tf.sigmoid(logits);
      // Probabilities of the left and right actions.
      const leftRightProbs = tf.concat([leftProb, tf.sub(1, leftProb)], 1);
      const actions = tf.multinomial(leftRightProbs, 1, null, true);
      return [logits, actions];
    });
  }
Get policy-network logits and the action based on state-tensor inputs.

@param {tf.Tensor} inputs A tf.Tensor instance of shape `[batchSize, 4]`.
@returns {[tf.Tensor, tf.Tensor]}
  1. The logits tensor, of shape `[batchSize, 1]`.
  2. The actions tensor, of shape `[batchSize, 1]`.