How to set weight randomly for TCN output

Kuldeep_Rana: <p>hello everyone,<br>
I am using multi slice-TCN model in my program. So each TCN generate the output and then multiply with weight and finally the combine all TCN’s result. equation like this (output = TCN’output * weight). So my question is that “How can i randomly initial the weight for TCN”. I am sending the screen shot. I am sending also my hand draw picture because i need like this picture.Thank your very much.<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/4/f/4fd3b8d62ba4501f244eb513bc9be3e4f6bd1ac6.png" data-download-href="https://discuss.pytorch.org/uploads/default/4fd3b8d62ba4501f244eb513bc9be3e4f6bd1ac6" title="Screenshot from 2021-08-20 18-41-54"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/4/f/4fd3b8d62ba4501f244eb513bc9be3e4f6bd1ac6_2_690x431.png" alt="Screenshot from 2021-08-20 18-41-54" data-base62-sha1="bobkC7kRtHzBBq6XR9pTcfflsH4" width="690" height="431" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/4/f/4fd3b8d62ba4501f244eb513bc9be3e4f6bd1ac6_2_690x431.png, https://discuss.pytorch.org/uploads/default/optimized/3X/4/f/4fd3b8d62ba4501f244eb513bc9be3e4f6bd1ac6_2_1035x646.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/4/f/4fd3b8d62ba4501f244eb513bc9be3e4f6bd1ac6_2_1380x862.png 2x" data-dominant-color="242D38"><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">Screenshot from 2021-08-20 18-41-54</span><span class="informations">1920×1200 417 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><br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/c/2/c244ac1e390ac98098ea769d496be53c46d86b82.jpeg" data-download-href="https://discuss.pytorch.org/uploads/default/c244ac1e390ac98098ea769d496be53c46d86b82" title="2cb2dba4-dfd6-4ce2-9754-e7336da4404c (1)"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/c/2/c244ac1e390ac98098ea769d496be53c46d86b82_2_412x499.jpeg" alt="2cb2dba4-dfd6-4ce2-9754-e7336da4404c (1)" data-base62-sha1="rIzL3RlvE6RF0CGjR8PLhFXaRMe" width="412" height="499" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/c/2/c244ac1e390ac98098ea769d496be53c46d86b82_2_412x499.jpeg, https://discuss.pytorch.org/uploads/default/optimized/3X/c/2/c244ac1e390ac98098ea769d496be53c46d86b82_2_618x748.jpeg 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/c/2/c244ac1e390ac98098ea769d496be53c46d86b82_2_824x998.jpeg 2x" data-dominant-color="F9F8F7"><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">2cb2dba4-dfd6-4ce2-9754-e7336da4404c (1)</span><span class="informations">1960×2374 251 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>

nateanl: <p>Hi <a class="mention" href="/u/kuldeep_rana">@Kuldeep_Rana</a>! You can use <code>torch.nn.init.uniform_</code> method to initialize your paramter. See <a href="https://pytorch.org/docs/stable/_modules/torch/nn/init.html#uniform_" rel="noopener nofollow ugc">this link</a></p>