code: def swish(features, use_native=True, use_hard=False):
      """Computes the Swish activation function.
  
      We provide three alternnatives:
        - Native tf.nn.swish, use less memory during training than composable swish.
        - Quantization friendly hard swish.
        - A composable swish, equivalant to tf.nn.swish, but more general for
          finetuning and TF-Hub.
  
      Args:
        features: A `Tensor` representing preactivation values.
        use_native: Whether to use the native swish from tf.nn that uses a custom
          gradient to reduce memory usage, or to use customized swish that uses
          default TensorFlow gradient computation.
        use_hard: Whether to use quantization-friendly hard swish.
  
      Returns:
        The activation value.
      """
      if use_native and use_hard:
          raise ValueError(
              "Cannot specify both use_native and use_hard."
          )
  
      if use_native:
          return tf.nn.swish(features)
  
      if use_hard:
          return (
              features
              * tf.nn.relu6(features + np.float32(3))
              * (1.0 / 6.0)
          )
  
      features = tf.convert_to_tensor(features, name="features")
      return features * tf.nn.sigmoid(features)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  import os
  import re
  from absl import logging
  import numpy
  import six
  import tensorflow.compat.v1
  import efficientnet_model
  import utils
label_desc: Use image node_id 2 for calling a global function with example usage: swish(features, use_native, use_hard) and returns: unknown, tf, unknown