chore(example/neural-style-transfer): GPU device for colab test
This commit is contained in:
parent
8fcda3e1f9
commit
1eb4f57f6f
|
@ -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())
|
||||
|
|
Loading…
Reference in New Issue
Block a user