{"record":{"id":"3efd20d95b85c876","repo":"tensorflow/models","slug":"only-support-square-crop-got-feature-shape-s","errorCode":null,"errorMessage":"Only support square crop. Got feature shape: %s","messagePattern":"Only support square crop\\. Got feature shape: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/projects/videoglue/datasets/dataset_factory.py","lineNumber":64,"sourceCode":"  def __init__(self, params: cfg.DataConfig, dataset_config: Mapping[str, Any]):\n    \"\"\"Constructor.\n\n    Args:\n      params: Instance of `Dataset` configuration,\n      dataset_config: The config dictionary used for data reader pipeline.\n    \"\"\"\n    self._params = params\n    self._dataset_config = dataset_config\n    self._name = params.name\n    self._is_training = params.is_training\n    self._shuffle = params.is_training\n\n    dataset_cls = FACTORY[self._name]\n    self._dataset_cls = dataset_cls(\n        subset='train' if self._is_training else 'test')\n\n    if params.feature_shape[1] != params.feature_shape[2]:\n      raise ValueError('Only support square crop. Got feature shape: %s' %\n                       params.feature_shape)\n\n    self._dataset_cls.configure(**dataset_config)\n    self._dataset_cls.tune(\n        prefetch_buffer_size=params.prefetch_buffer_size,\n        shuffle_buffer=params.shuffle_buffer_size,\n        num_process_threads=params.num_process_threads,\n        cycle_length=params.cycle_length,\n        num_parallel_calls_interleave=params.num_parallel_calls_interleave,\n        block_length=params.block_length)\n\n  def _dataset_fn(\n      self,\n      input_context: Optional[tf.distribute.InputContext] = None\n  ) -> tf.data.Dataset:\n    \"\"\"Generates features and labels for training or evaluation.\n\n    This uses the input pipeline based approach using file name queue to read","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/videoglue/datasets/dataset_factory.py#L46-L82","documentation":"Error \"Only support square crop. Got feature shape: %s\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/videoglue/datasets/dataset_factory.py:64 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"}