code: def prelu(x, slope, axis=1):
      """PReLU.
      It accepts two arguments: an input ``x`` and a weight array ``W``
      and computes the output as :math:`PReLU(x) y = x > 0 ? x : W * x`,
      where :math:`*` is an elementwise multiplication for each sample in the
      batch.
  
      Parameters
      ----------
      x : tvm.te.Tensor
          Input argument.
  
      slope : tvm.te.Tensor
          Channelised slope tensor for prelu
  
      axis : int
          The axis where the channel data needs to be applied
  
      Returns
      -------
      y : tvm.te.Tensor
          The result.
  
      Links
      -----
      [http://arxiv.org/pdf/1502.01852v1.pdf]
      """
  
      assert len(slope.shape) == 1
      assert axis < len(x.shape)
      assert get_const_int(slope.shape[0]) == get_const_int(
          x.shape[axis]
      )
  
      def _compute_channelwise(*indices):
          xval = x(*indices)
          return tvm.tir.Select(
              xval > 0, xval, xval * slope(indices[axis])
          )
  
      return te.compute(x.shape, _compute_channelwise)
  
file_path: tvm/python/tvm/topi/nn/elemwise.py
imports: from __future__ import absolute_import
  import tvm
  from tvm import te
  from ..None import tag
  from ..utils import get_const_int
label_desc: Use image node_id 3 for calling a global function with example usage: prelu(x, slope, axis) and returns: te, tvm