hardmaru / cppn-tensorflow Goto Github PK
View Code? Open in Web Editor NEWVery Simple and Basic Implementation of Compositional Pattern Producing Network in TensorFlow
Very Simple and Basic Implementation of Compositional Pattern Producing Network in TensorFlow
First of all sorry for the rather futile question, I know this doesn't seem specifically about the code itself but couldn't find the solution. My problem is that I can't generate the .gif files due to this error.
TypeErrorTraceback (most recent call last)
<ipython-input-80-2954e669139d> in <module>()
----> 1 sampler.save_anim_gif(z1, z2, 'output.gif')
/content/drive/cppn/sampler.py in save_anim_gif(self, z1, z2, filename, n_frame, duration1, duration2, duration, x_dim, y_dim, scale, reverse)
115 durations = durations + [duration]*n_frame + [duration1]
116 print ("writing gif file...")
--> 117 writeGif(filename, images, duration = durations)
118 im.save(filename)
/content/drive/images2gif.py in writeGif(filename, images, duration, repeat, dither, nq, subRectangles, dispose)
560 # Check subrectangles
561 if subRectangles:
--> 562 images, xy = gifWriter.handleSubRectangles(images, subRectangles)
563 defaultDispose = 1 # Leave image in place
564 else:
/content/drive/cppn/images2gif.py in handleSubRectangles(self, images, subRectangles)
298
299 # Determine the sub rectangles
--> 300 images, xy = self.getSubRectangles(images)
301
302 # Done
/content/drive/cppn/images2gif.py in getSubRectangles(self, ims)
350
351 # Cut out and store
--> 352 im2 = im[y0:y1,x0:x1]
353 prev = im
354 ims2.append(im2)
TypeError: only integer scalar arrays can be converted to a scalar index
My guess was that it is due to version of Tensorflow, so I updated everything [along with the amended version of images2gif.py] but still didn't work.
I really would appreciate any help on this.
Thanks very much for this wonderful thing.
Hello!
I love your work and wanted to try implementing the same in Keras.
I don't understand how and where in your code you are forward propagating through the network for each pixel position and storing it.
Could you please help me understand this?
Thank you!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.