Comments (7)
Are you sure the image you open at line 57 is of shape (3232,208,3)? Try opening an image separately and check the dimensions. The error has nothing to do with any code that you have attached above. image_shape
which is a parameter to sample_from_dataset()
function should match the dimensions of whatever image you are loading.
from anime-face-gan-keras.
@pavitrakumar78 I have previously checked the size of the images and am certain the dimensions I have provided above are correct, these images are images of actual 2d platformer game levels.
You mention that the error is not to do with the code? what does the error in screenshot refer to?Apologies but I am still pretty new to GAN models
from anime-face-gan-keras.
It does where the images are from and the error has nothing to do with GAN logic. It's just that the image you inputted is of shape (208,3232,3) and when you try to save it into an array of objects of shape (3232,208,3) it gives you the error you see above.
Try changing line 66 to:
sample[index,...] = image.T
from anime-face-gan-keras.
I then tried the following sample[index,...] = image.T[2,1,0] I got the following error
from anime-face-gan-keras.
Sorry. My bad, use np.rot90(image)
instead of image.T
because it's a 3D array.
from anime-face-gan-keras.
still producing index out of range error
from anime-face-gan-keras.
Please check where the error is coming from and work from there. The original error you had has been solved.
If you need help with matplotlib, check their documentation.
Since this is not an issue anymore with the actual code in the repository, I will close this issue. If you think there is still an issue related to the code (like GAN logic), feel free to re-open this issue.
from anime-face-gan-keras.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anime-face-gan-keras.