2 writes to Device
Microsoft.ML.TorchSharp (2)
AutoFormerV2\ObjectDetectionTrainer.cs (2)
213Device = TorchUtils.InitializeDevice(Parent.Host); 226Device = TorchUtils.InitializeDevice(Parent.Host);
6 references to Device
Microsoft.ML.TorchSharp (6)
AutoFormerV2\ObjectDetectionTrainer.cs (6)
221device: Device); 229if (Device.type == DeviceType.CUDA) 370var midTensor0 = torch.tensor(image.GetBGRPixels, device: Device); 386using var transMidTensor = torch.zeros(1, 3, image.Height + padH, image.Width + padW, device: Device); 388var imageTensor = Normalize(transMidTensor, Device); 401var labelTensor = torch.zeros(1, labels.Length, 5, dtype: ScalarType.Int64, device: Device);