@不只是码农 2022-05-16 20:10 采纳率: 0%
浏览 8
已结题

基于自编码器的多分类

inputLayer = tf.keras.layers.Input(shape=(500,))

编码层

encoded = tf.keras.layers.Dense(128, activation=ACTIVATION)(inputLayer)
encoder_output = tf.keras.layers.Dense(64, activation=ACTIVATION)(encoded)
LR = tf.keras.layers.Dense(10, activation=ACTIVATION_SORT)(encoder_output)

解码层

decoded = tf.keras.layers.Dense(64, activation=ACTIVATION)(encoder_output)
decoded = tf.keras.layers.Dense(128, activation=ACTIVATION)(decoded)
decoded = tf.keras.layers.Dense(500, activation='sigmoid')(decoded)
构建自编码模型:
autoencoder = tf.keras.Model(inputs=inputLayer, outputs=decoded)
autoencoder.compile(optimizer='adam', loss='mse')
hist = autoencoder.fit(x_train, x_train, epochs=200, batch_size=512, shuffle=True)
保留编码器:
encoder = tf.keras.Model(inputs=inputLayer, outputs=LR)
提问:autoencoder做不做训练,对下面的encoder有影响吗?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    问题事件

    • 系统已结题 5月24日
    • 创建了问题 5月16日

    悬赏问题

    • ¥15 怎么不用break/import过滤不符合要求的输入!求解答!
    • ¥15 cs2游戏卡顿,控制台一直跳码
    • ¥15 imshow 不能显示图片只有白色空白窗口
    • ¥15 MDPI期刊中pending review一般要多久
    • ¥15 有关伽马函数运算问题
    • ¥15 C语言,蓝桥杯拼数字
    • ¥15 vue3 获取同名ref 元素
    • ¥15 superset2.1, 饼形图文字颜色修改
    • ¥15 asp.net mvc从模板创建视图失败
    • ¥20 用qt设计一个完整程序(有偿)