Operations not traced on minimal example
Hi,

I have the following runtime exception:
`Unhandled exception: Operations leading to this variable were not fully traced.
Did you forget to set a requires_grad or to disable the context no_grad_mode? [ValueError]
[FAILED] can optimize
`

But I can't find the error in my code:


```
test "can optimize":
  let ctx = newContext Tensor[float32]

  let x = ctx.variable(randomTensor[float32](1, 1, 2'f32))
  let layer = ctx.variable((randomTensor(1, 1, 2.0f) -. 1.0f).astype(float32))
  let optim = newSGD[float32](
    layer, 0.01f
  )
  let result = linear(x, layer)

  let target = [[2.0f]].toTensor()
  let loss = result.sigmoid_cross_entropy(target)
  loss.backprop()
  optim.update()
  echo "Loss is:" & $loss.value
```



Any Ideas?
Thanks in advance