title: mask list/tensor with multiple conditions?
body: <p>The following code masks fine</p>
  <pre class="lang-py prettyprint-override"><code>mask = targets &gt;= 0
  targets = targets[mask]
  </code></pre>
  <p>However, when I try masking with two conditions, it gives an error of <code>RuntimeError: Boolean value of Tensor with more than one value is ambiguous</code></p>
  <pre class="lang-py prettyprint-override"><code>mask = (targets &gt;= 0 and targets &lt;= 5)
  targets = targets[mask]
  </code></pre>
  <p>is there a way to do this?</p>