detach unnecessary

This commit is contained in:
Brett Kuprel
2022-07-08 13:26:53 -04:00
parent 1b45a5de2a
commit 703bfb231d
2 changed files with 3 additions and 3 deletions
Vendored
+2 -2
View File
@@ -70,9 +70,9 @@ images = model.generate_images(
To get an image into PIL format you will have to first move the images to the CPU and convert the tensor to a numpy array.
```python
images = images.to('cpu').detach().numpy()
images = images.to('cpu').numpy()
```
Then image $i$ can be coverted to a PIL.Image and saved with its `save` method
Then image $i$ can be coverted to a PIL.Image and saved
```python
image = Image.fromarray(images[i])
image.save('image_{}.png'.format(i))