Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'Softmax' #29

Open
pbelecky opened this issue Nov 18, 2020 · 2 comments
Open

KeyError: 'Softmax' #29

pbelecky opened this issue Nov 18, 2020 · 2 comments

Comments

@pbelecky
Copy link

pbelecky commented Nov 18, 2020

Error while running nngen.from_onnx()

Download the onnx file:
https://github.com/onnx/models/blob/master/vision/classification/alexnet/model/bvlcalexnet-3.onnx

And run Python code:

import os
import sys

sys.path.insert(0, os.path.dirname(os.path.dirname(
    os.path.dirname(os.path.abspath(__file__)))))

import nngen as ng

act_dtype=ng.int16
weight_dtype=ng.int8
bias_dtype=ng.int32
scale_dtype=ng.int8
disable_fusion=False
onnx_filename='bvlcalexnet-3.onnx'

dtypes = {}
ng.from_onnx(onnx_filename,
             value_dtypes=dtypes,
             default_placeholder_dtype=act_dtype,
             default_variable_dtype=weight_dtype,
             default_constant_dtype=weight_dtype,
             default_operator_dtype=act_dtype,
             default_scale_dtype=scale_dtype,
             default_bias_dtype=bias_dtype,
             disable_fusion=disable_fusion)

the output is:

Traceback (most recent call last):
  File "load_onnx.py", line 25, in <module>
    disable_fusion=disable_fusion)
  File "/home/u/tensorflow/nngen_try3/nngen/nngen/onnx/__init__.py", line 329, in from_onnx
    visitor.visit(name)
  File "/home/u/tensorflow/nngen_try3/nngen/nngen/onnx/__init__.py", line 146, in visit
    node_func = _get_func(node.op_type)
  File "/home/u/tensorflow/nngen_try3/nngen/nngen/onnx/__init__.py", line 75, in _get_func
    return func_map[op_type]
KeyError: 'Softmax'
@ChiamHweeMin
Copy link

Hi, can you fix it as I also facing the same problem ?

@kanndil
Copy link

kanndil commented May 23, 2024

+1, same problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants