tensorflow/models · error · ValueError

Unknown conv type: {}

Error message

Unknown conv type: {}

What it means

Error "Unknown conv type: {}" thrown in tensorflow/models.

Source

Thrown at official/projects/edgetpu/vision/modeling/heads/bifpn_head.py:149

    })
    node_ids[i].append(next(id_cnt))

  return p


def get_conv_op(conv_type):
  """Gets convlution op."""
  kernel_size = int(conv_type.split('_')[-1])
  if conv_type.startswith('sep'):
    conv_op = functools.partial(
        tf_keras.layers.SeparableConv2D,
        depth_multiplier=1,
        kernel_size=(kernel_size, kernel_size))
  elif conv_type.startswith('conv'):
    conv_op = functools.partial(
        tf_keras.layers.Conv2D, kernel_size=(kernel_size, kernel_size))
  else:
    raise ValueError('Unknown conv type: {}'.format(conv_type))
  return conv_op


def add_n(nodes):
  """A customized add_n to add up a list of tensors."""
  # tf.add_n is not supported by EdgeTPU, while tf.reduce_sum is not supported
  # by GPU and runs slow on EdgeTPU because of the 5-dimension op.
  with tf.name_scope('add_n'):
    new_node = nodes[0]
    for n in nodes[1:]:
      new_node = new_node + n
    return new_node


def resize_nearest_neighbor(data, height_scale, width_scale):
  """Nearest neighbor upsampling implementation."""
  with tf.name_scope('nearest_upsampling'):
    bs, h, w, c = data.get_shape().as_list()

View on GitHub (pinned to e006f5f0d5)

When it happens

Trigger: Thrown at official/projects/edgetpu/vision/modeling/heads/bifpn_head.py:149 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tensorflow/models@e006f5f0d5 (2026-08-24). Data as JSON: /api/errors/4c24dd143f631061. Report an issue: GitHub.