class_docstr: Class to manage a scheduled (framework-dependent) tensor variable.
  
  Uses the PiecewiseSchedule (for maximum configuration flexibility)
docstr: Creates a framework-specific tensor variable to be scheduled.
  
  Args:
      initial_value: The initial (float) value for the variable to hold.
  
  Returns:
      The created framework-specific tensor variable.
docstr_tok: ["Creates","a","framework-specific","tensor","variable","to","be","scheduled",".","Args",":","initial_value",":","The","initial","(","float",")","value","for","the","variable","to","hold",".","Returns",":","The","created","framework-specific","tensor","variable","."]
code: def _create_tensor_variable(self, initial_value: float) -> TensorType:
      """Creates a framework-specific tensor variable to be scheduled.
  
      Args:
          initial_value: The initial (float) value for the variable to hold.
  
      Returns:
          The created framework-specific tensor variable.
      """
      if self.framework == "torch":
          return torch.tensor(
              initial_value,
              requires_grad=False,
              dtype=torch.float32,
              device=self.device,
          )
      else:
          return tf.Variable(
              initial_value,
              trainable=False,
              dtype=tf.float32,
          )
  
file_path: ray/rllib/utils/schedules/scheduler.py
imports: from typing import Optional
  from ray.rllib.utils.framework import try_import_tf, try_import_torch
  from ray.rllib.utils.schedules.piecewise_schedule import PiecewiseSchedule
  from ray.rllib.utils.typing import LearningRateOrSchedule, TensorType
label_desc: Use image node_id 5 for calling the Scheduler obj's underlying member method code with example usage: obj._create_tensor_variable(initial_value) and returns: torch, tf