question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unused parameters in final_res_block in UNet

See original GitHub issue

Looks like there are some unused parameters in the model. The following is an error message that I got from training it in DDP mode:

Parameters which did not receive grad for rank 14: final_res_block.time_mlp.1.bias, final_res_block.time_mlp.1.weight, norm_mid_cond.bias, norm_mid_cond.weight

On investigating, it seems like the root cause is missing c argument to the final_res_block here unless it is not required, in that case, the time_cond_dim argument should have been set to None.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
lucidrainscommented, Jun 22, 2022

@sarvghotra ok sounds good! i’ll proceed with the accelerate or pytorch lightning integration then 😄

1reaction
sarvghotracommented, Jun 22, 2022

For now, I am just trying to use Pytorch’s DDP. If I got some good initial results, will move to DeeepSpeed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CA1801: Review unused parameters (code analysis) - .NET
Unused parameters incur maintenance and performance costs. Sometimes, a violation of this rule can point to an implementation bug in the method.
Read more >
Mark unused parameters in Kotlin - Stack Overflow
I was able to set @Suppress("UNUSED_PARAMETER") above the method. So all three unused arguments of four in total are covered :) – ecth....
Read more >
CA1801 - Remove unused parameter code fix should not ...
For the following fragment: public struct Unit { public static bool operator ==(Unit x, Unit y) => true; public static bool operator !...
Read more >
misc-unused-parameters - clang-tidy
Finds unused function parameters. Unused parameters may signify a bug in the code (e.g. when a different parameter is used instead).
Read more >
Code Inspection: Unused parameter in partial method
This inspection detects unused parameters in the implementation parts of a partial method. Unused method parameters might indicate incomplete or dead code.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found