简体   繁体   中英

ValueError: Dimensions must be equal, but are 16 and 28 for 'activation_2/p_re_lu_l/mul' (op: 'Mul')

i'm Lee.I have a question about image recognition. The code i use now quotes the code uploaded to github of brendan fortuner. I usaed a PReLU activation function, which seems to have a problem in this part. I tried to solve it, but it's not working so i'm going to get you a hint about solving the problem. please give me a hint about on problem solving.

During the running of the model, the following error occurs:

ValueError: Dimensions must be equal, but 16 and 28 for 'activation_2/p_re_lu_l/mul' (op : Mul) with input shape [32,32,16], [?,32,32,28].

The error means that the number of output nodes and the number of input nodes of the layer s you are trying to connect do not agree. You can either

change [32,32, 16 ] to [32,32, 28 ]

Or

change [32,32, 28 ] to [32,32, 16 ]

depending on the shape of your input images (IF either of those two layers is the input layer).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM