You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for your great work. The code is easy to read.
I try to convert model to onnx format, but I am facing some errors.
Could you help me?
if I just comment the parts of torch.float32 in lerp function, would it causing problems?
def lerp(a, b, beta): if isinstance(beta, numbers.Number): if beta == 1: return b elif beta == 0: return a #if torch.is_tensor(a) and a.dtype == torch.float32: # torch lerp only available for fp32 # return torch.lerp(a, b, beta) # More numerically stable than a + beta * (b - a) return (1 - beta) * a + beta * b
I got this error (RuntimeError: Unsupported: ONNX export of convolution for kernel of unknown shape.), but I don't have any ideas
The text was updated successfully, but these errors were encountered:
It was a long time since I wrote this code so its difficult figuring out why the onnx export is failing.
You can replace all the code in utils.lerp with return (1 - beta) * a + beta * b. It should not affect performance too much (I think torch.lerp is faster because it is implemented in C++ directly). No idea how this would affect the export to onnx.
There are a lot of unconventional uses of convolutions in stylegan2, such as the blur filter and rescaling of weights before performing the convolution. Maybe these are not supported by onnx? Can you see which convolutional operation caused the error?
Thank you for your great work. The code is easy to read.
I try to convert model to onnx format, but I am facing some errors.
Could you help me?
def lerp(a, b, beta): if isinstance(beta, numbers.Number): if beta == 1: return b elif beta == 0: return a #if torch.is_tensor(a) and a.dtype == torch.float32: # torch lerp only available for fp32 # return torch.lerp(a, b, beta) # More numerically stable than a + beta * (b - a) return (1 - beta) * a + beta * b
The text was updated successfully, but these errors were encountered: