from keras.models import Model
from keras.layers import Input, Dense, Lambda
a = Input(shape=(640, 480, 3))
b = Input(shape=(23,))
c = Input(shape=(54,))
d = Dense(32)(b)
multi = Lambda(lambda x: x**3)
e = multi(c)
model_mine = Model(inputs=[a, b, c], outputs=[d, e])
model_mine.summary()
multi是个layer类
abcde都是tensor
model_mine是model类。
最后一句是打印。
没有数据,代码调试:
看一下每个变量的类型:
代码输出:
Using TensorFlow backend.
__________________________________________________________________________________________________
Layer (type) Output Shape Param # Connected to
========