chore(example/neural-style-transfer): GPU device for colab test

This commit is contained in:
sugarme 2020-07-05 01:44:34 +10:00
parent 8fcda3e1f9
commit 1eb4f57f6f

View File

@ -86,10 +86,10 @@ func main() {
log.Fatal(err)
}
// cuda := gotch.CudaBuilder(0)
// device := cuda.CudaIfAvailable()
cuda := gotch.CudaBuilder(0)
device := cuda.CudaIfAvailable()
device := gotch.CPU
// device := gotch.CPU
netVS := nn.NewVarStore(device)
in := vision.NewImageNet()
net := vision.VGG16(netVS.Root(), in.ClassCount())