Open
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Comment on lines
+21
to
+27
| temporal_channels = max(1, getattr(configs, "temporal_conv_channels", 4)) | ||
| temporal_dilation = max(1, getattr(configs, "temporal_conv_dilation", 1)) | ||
| self.temporal_conv = temporal_conv( | ||
| cin=1, | ||
| cout=temporal_channels, | ||
| dilation_factor=temporal_dilation, | ||
| seq_len=self.seq_len, |
There was a problem hiding this comment.
校验 temporal_conv 通道数避免生成 0 输出通道
这里将 temporal_channels 仅限制为 >=1 后直接传给 temporal_conv。而该模块内部在 dilated_inception 中会用 len(kernel_set)=4 整除 cout 并据此创建四个 nn.Conv2d。当配置文件把 temporal_conv_channels 设为 1~3 时,整除后的通道数变成 0,使卷积层初始化时触发 out_channels must be > 0 的异常,模型无法构建。应至少将该超参约束在 4 及其倍数范围内,或者在构造前做显式校验。
Useful? React with 👍 / 👎.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
models/temporal_conv.pywith the original implementation fromdream_code_v3/3_5_Temporal_conv.pyso it matches the reference module verbatimPaiFilterto import and instantiate the lowercasetemporal_convclass provided by the copied moduleTesting
python -m compileall modelsCodex Task