class_docstr: A  layer wrapper for random LTD
class_docstr_tok: ["A","layer","wrapper","for","random","LTD"]
code: def __init__(self, layer: Module):
      super(RandomLayerTokenDrop, self).__init__()
      self.random_ltd_layer = layer
      self.reserved_length = None  # config['max_value']
      self.random_ltd_scheduler = None
      self.max_length = None
      self.reserved_length = -1
      self.curr_seq = -1
      self.batch_first = False
  
file_path: DeepSpeed/deepspeed/runtime/data_pipeline/data_routing/basic_layer.py
imports: from deepspeed.utils import logger
  from torch import Tensor
  from torch.nn import Module
  from ..constants import *
  from deepspeed.ops.random_ltd.dropping_utils import gpt_sample_tokens, bert_sample_tokens, GatherTokens, ScatterTokens
label_desc: Use image node_id 1 to create a new RandomLayerTokenDrop object from inherited base classes: Module with example: obj = RandomLayerTokenDrop(layer)