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

Update image-augmentation.md #1355

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

XihWang
Copy link

@XihWang XihWang commented Dec 15, 2024

d2l中的residual存在问题。其使用了lazyconv2d会导致报错。报错提示如下:
Attempted to use an uninitialized parameter in <method 'view_as' of 'torch._C.TensorBase' objects>. This error happens when you are using a LazyModule or explicitly manipulating torch.nn.parameter.UninitializedParameter objects. When using LazyModules Call forward with a dummy batch to initialize the parameters before calling torch functions。

建议将lazyconv2d改为conv2d,就能正常运行
更改前:
image
更改后:
image

d2l中的residual存在问题。其使用了lazyconv2d会导致报错。报错提示如下:
Attempted to use an uninitialized parameter in <method 'view_as' of 'torch._C.TensorBase' objects>. This error happens when you are using a `LazyModule` or explicitly manipulating `torch.nn.parameter.UninitializedParameter` objects. When using LazyModules Call `forward` with a dummy batch to initialize the parameters before calling torch functions。

建议将lazyconv2d改为conv2d,就能正常运行
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

Successfully merging this pull request may close these issues.

1 participant