{
  "id": 101580,
  "title": "How to save images generated from model -- Tensorflow",
  "url": "/competitions/generative-dog-images/discussion/101580",
  "author_name": "Chad Malla",
  "post_date": "2019-07-26T23:11:32.547000",
  "votes": 0,
  "comment_count": 0,
  "views": 0,
  "content": "<p>I am trying to save the images generated from the model but complains that EagerTensors don't have attribute save so I converted to np.array and pass into Image.fromarray() but the return is a pixelated image. </p>\n\n<p>I tried to plt.imshow() before converting to np.array and the image is somewhat more reasonable as an output from a trained model. So I think converting to np.array screws something up?</p>\n\n<p>Here is my <a href=\"https://www.kaggle.com/cmalla94/dcgan-generating-dog-images-with-tensorflow\">kernel</a>, you can just jump to the 'Train Step' tab. </p>\n\n<p>Thanks!</p>",
  "messages": [
    {
      "id": 585083,
      "postDate": "2019-07-26T23:11:32.547Z",
      "content": "<p>I am trying to save the images generated from the model but complains that EagerTensors don't have attribute save so I converted to np.array and pass into Image.fromarray() but the return is a pixelated image. </p>\n\n<p>I tried to plt.imshow() before converting to np.array and the image is somewhat more reasonable as an output from a trained model. So I think converting to np.array screws something up?</p>\n\n<p>Here is my <a href=\"https://www.kaggle.com/cmalla94/dcgan-generating-dog-images-with-tensorflow\">kernel</a>, you can just jump to the 'Train Step' tab. </p>\n\n<p>Thanks!</p>",
      "rawMarkdown": "I am trying to save the images generated from the model but complains that EagerTensors don't have attribute save so I converted to np.array and pass into Image.fromarray() but the return is a pixelated image. \n\nI tried to plt.imshow() before converting to np.array and the image is somewhat more reasonable as an output from a trained model. So I think converting to np.array screws something up?\n\nHere is my [kernel](https://www.kaggle.com/cmalla94/dcgan-generating-dog-images-with-tensorflow), you can just jump to the 'Train Step' tab. \n\nThanks!"
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "585083": "I am trying to save the images generated from the model but complains that EagerTensors don't have attribute save so I converted to np.array and pass into Image.fromarray() but the return is a pixelated image. \n\nI tried to plt.imshow() before converting to np.array and the image is somewhat more reasonable as an output from a trained model. So I think converting to np.array screws something up?\n\nHere is my [kernel](https://www.kaggle.com/cmalla94/dcgan-generating-dog-images-with-tensorflow), you can just jump to the 'Train Step' tab. \n\nThanks!"
  }
}