本文整理汇总了Python中sequence_layers.SequenceLayerParams方法的典型用法代码示例。如果您正苦于以下问题:Python sequence_layers.SequenceLayerParams方法的具体用法?Python sequence_layers.SequenceLayerParams怎么用?Python sequence_layers.SequenceLayerParams使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sequence_layers
的用法示例。
在下文中一共展示了sequence_layers.SequenceLayerParams方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: create_layer
# 需要导入模块: import sequence_layers [as 别名]
# 或者: from sequence_layers import SequenceLayerParams [as 别名]
def create_layer(layer_class, batch_size, seq_length, num_char_classes):
model_params = model.ModelParams(
num_char_classes=num_char_classes,
seq_length=seq_length,
num_views=1,
null_code=num_char_classes)
net = fake_net(
batch_size=batch_size, num_features=seq_length * 5, feature_size=6)
labels_one_hot = fake_labels(batch_size, seq_length, num_char_classes)
layer_params = sequence_layers.SequenceLayerParams(
num_lstm_units=10, weight_decay=0.00004, lstm_state_clip_value=10.0)
return layer_class(net, labels_one_hot, model_params, layer_params)