diff --git a/ctr/README.md b/ctr/README.md index 80053d565eea65d460603c030bcc9fed689d3d70..3ed09385fa1d57d7a429b21b6f8abba1c8bde37f 100644 --- a/ctr/README.md +++ b/ctr/README.md @@ -117,12 +117,12 @@ Deep 部分使用了标准的多层前向传导的 NN 模型 def build_dnn_submodel(dnn_layer_dims): dnn_embedding = layer.fc(input=dnn_merged_input, size=dnn_layer_dims[0]) _input_layer = dnn_embedding - for no, dim in enumerate(dnn_layer_dims[1:]): + for i, dim in enumerate(dnn_layer_dims[1:]): fc = layer.fc( input=_input_layer, size=dim, act=paddle.activation.Relu(), - name='dnn-fc-%d' % no) + name='dnn-fc-%d' % i) _input_layer = fc return _input_layer ``` diff --git a/ctr/train.py b/ctr/train.py index 7525c80295345e8e08b6ac6112edcdeb86b03eeb..53536d999b2c8851458598b4a5b4414ac45fda25 100644 --- a/ctr/train.py +++ b/ctr/train.py @@ -40,12 +40,12 @@ click = paddle.layer.data(name='click', type=dtype.dense_vector(1)) def build_dnn_submodel(dnn_layer_dims): dnn_embedding = layer.fc(input=dnn_merged_input, size=dnn_layer_dims[0]) _input_layer = dnn_embedding - for no, dim in enumerate(dnn_layer_dims[1:]): + for i, dim in enumerate(dnn_layer_dims[1:]): fc = layer.fc( input=_input_layer, size=dim, act=paddle.activation.Relu(), - name='dnn-fc-%d' % no) + name='dnn-fc-%d' % i) _input_layer = fc return _input_layer