{"record":{"id":"41c93dcb0591b198","repo":"tensorflow/models","slug":"strides-must-match-in-the-spatial-dimensions-got","errorCode":null,"errorMessage":"Strides must match in the spatial dimensions, got {}","messagePattern":"Strides must match in the spatial dimensions, got (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/projects/movinet/modeling/movinet.py","lineNumber":620,"sourceCode":"                input_shape[0],\n                kernel_size[0] - 1,\n                divide_resolution(input_shape[2], num_downsamples),\n                divide_resolution(input_shape[3], num_downsamples),\n                expand_filters,\n            )\n\n          if '3d' in self._se_type:\n            states[f'{prefix}_pool_buffer'] = (\n                input_shape[0], 1, 1, 1, expand_filters,\n            )\n            states[f'{prefix}_pool_frame_count'] = (1,)\n\n          if use_positional_encoding:\n            name = f'{prefix}_pos_enc_frame_count'\n            states[name] = (1,)\n\n          if strides[1] != strides[2]:\n            raise ValueError('Strides must match in the spatial dimensions, '\n                             'got {}'.format(strides))\n\n          # If we use a 3D kernel, we apply spatial downsampling\n          # after the buffer.\n          if (tuple(strides[1:3]) != (1, 1) and\n              self._conv_type not in ['2plus1d', '3d_2plus1d']):\n            num_downsamples += 1\n      elif isinstance(block, HeadSpec):\n        states['state_head_pool_buffer'] = (\n            input_shape[0], 1, 1, 1, block.project_filters,\n        )\n        states['state_head_pool_frame_count'] = (1,)\n\n    return states\n\n  def _get_state_dtype(self, name: str) -> str:\n    \"\"\"Returns the dtype associated with a state.\"\"\"\n    if 'frame_count' in name:","sourceCodeStart":602,"sourceCodeEnd":638,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/movinet/modeling/movinet.py#L602-L638","documentation":"Error \"Strides must match in the spatial dimensions, got {}\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/movinet/modeling/movinet.py:620 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"}