keras
文章平均质量分 53
DecafTea
定量,归类(框架),融合,体系
展开
-
Character-level recurrent sequence-to-sequence model (char-level机器翻译,seq2seq模型,LSTM)
理解encoder_outputs, state_h, state_c = encoder(encoder_inputs)的三个输出:https://huhuhang.com/post/machine-learning/lstm-return-sequences-stateinputs = tf.keras.layers.Input(shape=(3, 1))lstm = tf.keras.layers.LSTM(1, return_state=True)(inputs)model = tf.ke原创 2021-03-03 18:46:38 · 185 阅读 · 0 评论 -
keras-sequential/functional model(序贯式/函数式定义模型)
1. 定义模型架构序贯式和函数式都可以定义模型架构,序贯式是层层叠加定义模型,函数式是通过input-middle_output1-middle_output2-…-output定义模型。一般两种方式可以互换。序贯式:函数式:但是,对于inception network这种input-多个middle_output-output这种需要“分流”的情况,只能用函数式定义模型。Note:Input(shape=())定义输入的dimkeras.layers.concatenate(原创 2021-01-14 19:46:16 · 394 阅读 · 0 评论 -
Keras-regression
input, noise = {ndarry: }input.size = {tuple: }希望预测出的非线性函数:x^2generate 200 training examples:(x,x^2+noise), x between -0.5 and 0.5import numpy as npimport kerasimport matplotlib.pyplot as pltfrom keras.models import Sequentialfrom keras.layers imp原创 2020-12-25 20:11:36 · 123 阅读 · 0 评论