Skip to content

ValueError: Input 0 of layer "sequential_36" is incompatible with the layer: expected shape=(None, 256, 1), found shape=(None, 128, 1) #6

@Harsh-2200

Description

@Harsh-2200

def build_generator():
model = Sequential()

#take in random vlaues and reshape it to 7x7x128
#Beginnings of the generated images

model.add(Dense(77128 , input_dim = 128))
model.add(LeakyReLU(0.2))
model.add(Reshape((7,7,128)))

Upsampling block 1

model.add(UpSampling2D()) # 7x7x128 --> 14x14x128
model.add(Conv2D(128 , 5 , padding = 'same'))
model.add(LeakyReLU(0.2))

this make more suffication in layer and create more parameter

'''
model.add(UpSampling2D())
model.add(Conv2D(1 , 5 , padding = 'same'))
model.add(LeakyReLU(0.2))
'''

Upsampling block 2

model.add(UpSampling2D())
model.add(Conv2D(128 , 5 , padding = 'same'))
model.add(LeakyReLU(0.2))

Convolutional block 1

model.add(Conv2D(128, 4, padding='same'))
model.add(LeakyReLU(0.2))

Convolutional block 2

model.add(Conv2D(128, 4, padding='same'))
model.add(LeakyReLU(0.2))

Conv layer to get to one channel

model.add(Conv2D(1, 4, padding='same', activation='sigmoid'))

return model

and i use weight of given h5 file and it giving me error of

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions