fix(example/neural-style-transfer): save image

This commit is contained in:
sugarme 2020-07-05 15:02:45 +10:00
parent 8fc6efca1c
commit a0653fe4d3

View File

@ -175,7 +175,7 @@ func main() {
if (stepIdx % 1000) == 0 {
clone := inputVar.MustShallowClone()
img := clone.MustDetach()
imageTs := img.MustTo(device, true)
imageTs := img.MustTo(gotch.CPU, true)
clone.MustDrop()
err := in.SaveImage(imageTs, fmt.Sprintf("../../data/neural-style-transfer/out%v.jpg", stepIdx))
if err != nil {