ONNX export with dynamic_axes
does not work when applying BlurPool
#3466
Labels
bug
Something isn't working
dynamic_axes
does not work when applying BlurPool
#3466
When I try to save a ResNet18 model to ONNX with the
export_for_inference
function while providing theapply_blurpool
surgery algorithm as well as the dynamic axes I get the following error:** Environment **
** To reproduce
Code snipeet that throws the error:
The error seems to happen in the code for applying the
blurpool
operation to theMaxPool2D
layer.The
blur_2d
function seems to be called withnum_channels=-1
which triggers the dynamic control flow not supported by tracing.The issue also persists when:
composer
,torch
The issue disappears when:
partial(cf.apply_blurpool, replace_maxpools=False)
Also, the
TracerWarning
s should probably be errors, as the model might not work as expected.The text was updated successfully, but these errors were encountered: