code: def policy_forward(x, model):
      # neurons in the hidden layer (W1) can detect various game senarios
      h = np.dot(
          model["W1"], x
      )  # compute hidden layer neuron activations
      h[h < 0] = 0  # ReLU nonlinearity. threhold at zero
      # weights in W2 can then decide if each case we should go UP or DOWN
      logp = np.dot(
          model["W2"], h
      )  # compuate the log probability of going up
      p = sigmoid(logp)
      # Return probability of taking action 2, and hidden state.
      return p, h
  
file_path: BigDL/python/orca/example/ray_on_spark/rl_pong/rl_pong.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import argparse
  import os
  import time
  import gym
  import numpy
  import ray
  from bigdl.orca import init_orca_context, stop_orca_context
  from bigdl.orca import OrcaContext
label_desc: Use image node_id 4 for calling a global function with example usage: policy_forward(x, model) and returns: p,  h