{"record":{"id":"cd51ea34f3b99250","repo":"tensorflow/models","slug":"bad-conversion-model-outputs-do-not-match","errorCode":null,"errorMessage":"Bad conversion, model outputs do not match.","messagePattern":"Bad conversion, model outputs do not match\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/projects/movinet/tools/convert_3d_2plus1d.py","lineNumber":98,"sourceCode":"    else:\n      if var_3d_2plus1d.shape[0] == 1:\n        weight = var_3d_2plus1d[0]\n      else:\n        weight = var_3d_2plus1d[:, 0]\n      if weight.shape[-1] != var_2plus1d.shape[-1]:\n        # Transpose any depthwise kernels (conv3d --> depthwise_conv2d)\n        weight = tf.transpose(weight, perm=(0, 1, 3, 2))\n      weights.append(weight)\n  model_2plus1d.set_weights(weights)\n\n  if FLAGS.verify_output:\n    inputs = tf.random.uniform([1, 6, 64, 64, 3], dtype=tf.float32)\n\n    logits_2plus1d = model_2plus1d(inputs)\n    logits_3d_2plus1d = model_3d_2plus1d(inputs)\n\n    if tf.reduce_mean(logits_2plus1d - logits_3d_2plus1d) > 1e-5:\n      raise ValueError('Bad conversion, model outputs do not match.')\n\n  save_checkpoint = tf.train.Checkpoint(\n      model=model_2plus1d, backbone=backbone_2plus1d)\n  save_checkpoint.save(FLAGS.output_checkpoint_path)\n\n\nif __name__ == '__main__':\n  flags.mark_flag_as_required('input_checkpoint_path')\n  flags.mark_flag_as_required('output_checkpoint_path')\n  app.run(main)\n","sourceCodeStart":80,"sourceCodeEnd":109,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/movinet/tools/convert_3d_2plus1d.py#L80-L109","documentation":"Error \"Bad conversion, model outputs do not match.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/movinet/tools/convert_3d_2plus1d.py:98 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"}