also use TorchSwitch to set torch state