User:Saman fatima1122
Appearance
def build_generator():
model = models.Sequential() model.add(layers.Dense(256, input_dim=100, activation='relu')) model.add(layers.Reshape((8, 8, 4))) model.add(layers.Conv2DTranspose(64, (5,5), strides=2, padding='same', activation='relu')) model.add(layers.Conv2DTranspose(128, (5,5), strides=2, padding='same', activation='relu')) model.add(layers.Conv2DTranspose(3, (5,5), strides=2, padding='same', activation='tanh')) # RGB channels return model
generator = build_generator()
- Generate new emojis from random noise
random_input = np.random.randn(1, 100) # Random noise vector generated_emoji = generator.predict(random_input) plt.imshow(generated_emoji[0])