title: how to get sub 2d tensor with specific value condition in pytorch?
body: <p>I want to copy a 2-d torch tensor to a destination tensor containing only values until the first occurrence of 202 value and zero for the rest of the items like this:</p>
  <pre><code>source_t=tensor[[101,2001,2034,1045,202,3454,3453,1234,202]
           ,[101,1999,2808,202,17658,3454,202,0,0]
           ,[101,2012,3832,4027,3454,202,3454,9987,202]]
  
  destination_t=tensor[[101,2001,2034,1045,202,0,0,0,0]
                      ,[101,1999,2808,202,0,0,0,0,0]
                      ,[101,2012,3832,4027,3454,202,0,0,0]]
  </code></pre>
  <p>how can I do it?</p>