docstr: Initializes gradient-based PyTorch optimizers.
docstr_tok: ["Initializes","gradient-based","PyTorch","optimizers","."]
code: def do_optimizer_initializations(self, optimizer, learning_rate):
      """Initializes gradient-based PyTorch optimizers."""
      opt_method = optimizer.split(":")[1]
  
      # optimizater initialization
      if opt_method == "adam":
          self.optimizer = torch.optim.Adam(self.cfs, lr=learning_rate)
      elif opt_method == "rmsprop":
          self.optimizer = torch.optim.RMSprop(
              self.cfs, lr=learning_rate
          )
  
imports: import copy
  import random
  import timeit
  import numpy
  import torch
  from dice_ml import diverse_counterfactuals
  from dice_ml.explainer_interfaces.explainer_base import ExplainerBase
label_desc: Use image node_id 9 for calling the DicePyTorch obj's underlying member method code with example usage: obj.do_optimizer_initializations(optimizer, learning_rate) without return types