{"record":{"id":"bbd15a75cf8c0693","repo":"tensorflow/models","slug":"the-input-to-the-cspstack-must-be-a-list-of-layers","errorCode":null,"errorMessage":"the input to the CSPStack must be a list of layers that we caniterate through, or \n a callable","messagePattern":"the input to the CSPStack must be a list of layers that we caniterate through, or \n a callable","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"official/projects/yolo/modeling/layers/nn_blocks.py","lineNumber":907,"sourceCode":"    # convoultion params\n    self._kernel_initializer = kernel_initializer\n    self._bias_initializer = bias_initializer\n    self._kernel_regularizer = kernel_regularizer\n    self._bias_regularizer = bias_regularizer\n    self._use_bn = use_bn\n    self._use_sync_bn = use_sync_bn\n    self._use_separable_conv = use_separable_conv\n    self._norm_momentum = norm_momentum\n    self._norm_epsilon = norm_epsilon\n\n    if model_to_wrap is None:\n      self._model_to_wrap = []\n    elif isinstance(model_to_wrap, Callable):\n      self._model_to_wrap = [model_to_wrap]\n    elif isinstance(model_to_wrap, List):\n      self._model_to_wrap = model_to_wrap\n    else:\n      raise TypeError(\n          'the input to the CSPStack must be a list of layers that we can' +\n          'iterate through, or \\n a callable')\n\n  def build(self, input_shape):\n    dark_conv_args = {\n        'filters': self._filters,\n        'filter_scale': self._filter_scale,\n        'activation': self._activation,\n        'kernel_initializer': self._kernel_initializer,\n        'bias_initializer': self._bias_initializer,\n        'bias_regularizer': self._bias_regularizer,\n        'use_bn': self._use_bn,\n        'use_sync_bn': self._use_sync_bn,\n        'use_separable_conv': self._use_separable_conv,\n        'norm_momentum': self._norm_momentum,\n        'norm_epsilon': self._norm_epsilon,\n        'kernel_regularizer': self._kernel_regularizer,\n    }","sourceCodeStart":889,"sourceCodeEnd":925,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/yolo/modeling/layers/nn_blocks.py#L889-L925","documentation":"Error \"the input to the CSPStack must be a list of layers that we caniterate through, or \n a callable\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/yolo/modeling/layers/nn_blocks.py:907 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e006f5f0d534913e49c1f1dae87364039fa607e2","analyzedAt":"2026-08-24T14:09:15.576Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}