class_docstr: Interface for torch models.
class_docstr_tok: ["Interface","for","torch","models","."]
code: def random_layer_generator_length(self) -> int:
      return len(
          [
              i
              for i in self.model.named_modules()
              if (hasattr(i[1], "reset_parameters"))
          ]
      )
  
imports: import copy
  from contextlib import suppress
  from copy import deepcopy
  from typing import Any, Dict, Optional, Tuple, List, Union, Generator
  import warnings
  import logging
  import numpy
  import torch
  from torch import nn
  from functools import lru_cache
  from quantus.helpers import utils
  from quantus.helpers.model.model_interface import ModelInterface
label_desc: Use image node_id 13 for calling the PyTorchModel obj's underlying member method code with example usage: obj.random_layer_generator_length() and returns: len