Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to convert encoded_image from tensor to numpy ? #45

Open
Lee-meng-meng opened this issue Mar 1, 2022 · 2 comments
Open

How to convert encoded_image from tensor to numpy ? #45

Lee-meng-meng opened this issue Mar 1, 2022 · 2 comments

Comments

@Lee-meng-meng
Copy link

The encoded_image in the network has always been operated in the form of a tensor. When I want to make some changes to the noise layer, I find that I cannot directly assign a value to the tensor, so I want to convert the encoded_image to the form of an array first. I use sess.run and .eval() both failed. Is there any solution? Thank you very much! ! ! ! ! !

@Github-Shaw
Copy link

我最近也在研究这个模型,可以留个联系方式交流一下吗

@monument-and-sea-all-the-gift

网络中的encoded_image一直以张量的形式进行操作。当我想对噪声层进行一些更改时,我发现我无法直接为张量赋值,所以我想先将encoded_image转换为数组的形式。我使用 sess.run 和 .eval() 都失败了。有什么解决办法吗?非常感谢!!!!!!

没试过.cpu().detach().numpy()么

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants