muxamilian / duralava Goto Github PK
View Code? Open in Web Editor NEWduralava is a neural network which can simulate a lava lamp in an infinite loop.
Home Page: https://news.ycombinator.com/item?id=30222243
duralava is a neural network which can simulate a lava lamp in an infinite loop.
Home Page: https://news.ycombinator.com/item?id=30222243
When changing img_size = 64
to count for images with different width and height i.e., also changing the process_img
to:
def process_img(file_path, img_w, img_h):
img = tf.io.read_file(file_path)
img = tf.image.decode_jpeg(img, channels=3)
img = tf.image.convert_image_dtype(img, tf.float32)
img = tf.image.resize(img, size=(img_h, img_w), method='area')
img = tf.image.convert_image_dtype(img, tf.uint8)
return img
and the definition of the discriminator to:
def make_discriminator_model():
disc = tf.keras.Sequential(
[
layers.Input(shape=(img_h, img_w, 3)),
...
and line 391 to: all_images.append(process_img(item, img_w, img_h))
The training crashes after the first epoch with: ValueError: Cannot reshape a tensor with 49152 elements to shape [32,128] (4096 elements) for '{{node Reshape}} = Reshape[T=DT_FLOAT, Tshape=DT_INT32](discriminator/flatten/Reshape, Reshape/shape)' with input shapes: [32,1536], [2] and with input tensors computed as partial shapes: input[1] = [32,128].
Apparently, there is a problem here: real_first_output = tf.reshape(self.discriminator(images[i,...], training=True), (batch_size, disc_dim))
. Somehow, the discriminator is not outputting correct dimension for reshaping. I have doubts that something is wrong with disc_dim
but couldn't solve it.
I am using:
img_w = 256
img_h = 144
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.