akankshakshurai/cuda-error-resolution-analysis huggingface dataset:
Assign custom weight

username: mohammadreza_Aalaei
cooked: <p>I want to assign custom weights to my model but it doesn’t work correctly.<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/3/d/3d3792714f547e20c7ee07fd500c6e4b9cd31e49.jpeg" data-download-href="https://discuss.pytorch.org/uploads/default/3d3792714f547e20c7ee07fd500c6e4b9cd31e49" title="Capture"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/3/d/3d3792714f547e20c7ee07fd500c6e4b9cd31e49_2_690x478.jpeg" alt="Capture" data-base62-sha1="8JybFCyUumDyVbk4OR1FpChFlOh" width="690" height="478" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/3/d/3d3792714f547e20c7ee07fd500c6e4b9cd31e49_2_690x478.jpeg, https://discuss.pytorch.org/uploads/default/original/3X/3/d/3d3792714f547e20c7ee07fd500c6e4b9cd31e49.jpeg 1.5x, https://discuss.pytorch.org/uploads/default/original/3X/3/d/3d3792714f547e20c7ee07fd500c6e4b9cd31e49.jpeg 2x" data-dominant-color="F2F2F2"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">Capture</span><span class="informations">862×598 65.6 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p>the output is expected to be [1, 2, 3, 4, 5] but isn’t as expected. What am I missing here? I would really appreciate it if someone helps me.</p>

username: ptrblck
cooked: <p><code>mod.linear</code> is the <code>nn.Sequential</code> container not the <code>nn.Linear</code> layer. You are assigning new <code>.weight</code> and <code>.bias</code> attribute to <code>nn.Sequential</code> which won’t be used.</p>
<p>PS: you can post code snippets by wrapping them into three backticks ```, which makes debugging easier.</p>