About this project...
$ git clone https://github.com/Yoctol/talos.git
$ pipenv install
多個 Layers 組合串接
def pre_activate_bn_dense(units):
return Sequential([
Dense(
units=units,
kernel_initialzer='lecun_normal',
activation=None,
),
BatchNormalization(),
Activation('relu'),
])
model = Sequential([
pre_activate_bn_dense(32),
pre_activate_bn_dense(16),
pre_activate_bn_dense(8),
])
outputs = model(inputs)
方便的 variables/updates scope collection
with tf.control_dependencies(model.updates):
train_op = SGDOptimizer(loss, var_list=model.trainable_variables)
$ pipenv install --dev
$ pytest