onnx / models

A collection of pre-trained, state-of-the-art models in the ONNX format
http://onnx.ai/models/
Apache License 2.0
7.97k stars 1.41k forks source link

SqueezeNet Incorrect Architectures #578

Open d57montes opened 2 years ago

d57montes commented 2 years ago

Bug Report

Which model does this pertain to?

SqueezeNet 1.0 and SqueezeNet 1.1

Describe the bug

SqueezeNet 1.1 pre-trained models (PTMs) are being falsely advertised as SqueezeNet 1.0. Below is an image of squeezenet1.1-7.onnx visualized with netron.app. image This PTM matches the SqueezeNet 1.1 architecture proposed in the SqueezeNet GitHub repository. As can be seen in the image below, the PTM correctly has 64 3x3 kernels in the first conv layer. image SqueezeNet 1.0 has a distinct architecture as can be seen in Table 1 of the paper that proposed SqueezeNet 1.0. However, the SqueezeNet 1.0 PTMs advertised by this repository are all SqueezeNet 1.1. For example, squeezenet1.0-3.onnx is visualized below. image It looks identical to the visualization of the SqueezeNet 1.1 PTM! In other words, all the SqueezeNet 1.0 PTMs incorrectly implement the SqueezeNet 1.1 architecture. This is the case for the following PTMs:

The implications of this is that an engineer might switch to the SqueezeNet 1.1 PTM from the SqueezeNet 1.0 PTM expecting a decrease in latency (fewer FLOPs) only to find out that they have been using SqueezeNet 1.1 all along. Even more concerning, researchers using these PTMs will have incorrect results/findings.

Reproduction instructions

Download the SqueezeNet PTMs and visualize them on netron.app.