分类:keras
2020
09-29
我就废话不多说了,大家还是直接看代码吧!model=keras.models.Sequential([#卷积层1keras.layers.Conv2D(32,kernel_size=5,strides=1,padding="same",data_format="channels_last",activation=tf.nn.relu,kernel_regularizer=keras.regularizers.l2(0.01)),#池化层1keras.layers.MaxPool2D(pool_size=2,strides=2,padding="same"),#卷积层2keras.layers.Conv2D(64,kernel_size=5,strides=1,padding="same",data_format="c...
继续阅读 >
keras根据层名称来初始化网络defget_model(input_shape1=[75,75,3],input_shape2=[1],weights=None):bn_model=0trainable=True#kernel_regularizer=regularizers.l2(1e-4)kernel_regularizer=Noneactivation='relu'img_input=Input(shape=input_shape1)angle_input=Input(shape=input_shape2)#Block1x=Conv2D(64,(3,3),activation=activation,padding='same',trainable=trainable,kerne...
继续阅读 >