{"record":{"id":"fb460f7e3e7ac8e7","repo":"tensorflow/models","slug":"upsampling-type-is-not-supported","errorCode":null,"errorMessage":"Upsampling type {} is not supported.","messagePattern":"Upsampling type (.+?) is not supported\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/projects/edgetpu/vision/modeling/heads/bifpn_head.py","lineNumber":215,"sourceCode":"        feat = tf.reshape(feat, [-1, 1, w, c])\n        feat = tf.image.resize(feat, [1, target_width])\n        feat = tf.reshape(feat, [b, target_height, target_width, c])\n      else:\n        feat = tf.image.resize(feat, [target_height, target_width])\n    else:\n      feat = tf.image.resize(feat, [target_height, target_width])\n  elif method == 'nearest':\n    _, h, w, _ = feat_shape.as_list()\n    if training and target_height % h == 0 and target_width % w == 0:\n\n      feat = resize_nearest_neighbor(feat, target_height // h,\n                                     target_width // w)\n    else:\n      feat = tf.cast(feat, tf.float32)\n      feat = tf.image.resize(feat, [target_height, target_width],\n                             tf.image.ResizeMethod.NEAREST_NEIGHBOR)\n  else:\n    raise ValueError('Upsampling type {} is not supported.'.format(method))\n  return tf.cast(feat, dtype)\n\n\nclass ResampleFeatureMap(tf_keras.layers.Layer):\n  \"\"\"Resamples feature map for downsampling or upsampling.\"\"\"\n\n  def __init__(self,\n               feat_level,\n               target_num_channels,\n               apply_bn=False,\n               is_training_bn=None,\n               conv_after_downsample=False,\n               strategy=None,\n               data_format=None,\n               pooling_type=None,\n               upsampling_type=None,\n               name='resample_p0'):\n    super().__init__(name=name)","sourceCodeStart":197,"sourceCodeEnd":233,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/edgetpu/vision/modeling/heads/bifpn_head.py#L197-L233","documentation":"Error \"Upsampling type {} is not supported.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/edgetpu/vision/modeling/heads/bifpn_head.py:215 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"}