b787cdf9d9d1c7f500f91ccdeb87aa6d7725ae14,deepctr/layers/interaction.py,FGCNNLayer,call,#FGCNNLayer#Any#,790
Before Change
"Unexpected inputs dimensions %d, expect to be 3 dimensions" % (K.ndim(inputs)))
embedding_size = inputs.shape[-1].value
pooling_result = tf.keras.layers.Lambda(lambda x: tf.expand_dims(x, axis=3))(inputs)
new_feature_list = []
for i in range(1, len(self.filters) + 1):
filters = self.filters[i - 1]
width = self.kernel_width[i - 1]
new_filters = self.new_maps[i - 1]
pooling_width = self.pooling_width[i - 1]
conv_result = tf.keras.layers.Conv2D(filters=filters, kernel_size=(width, 1), strides=(1, 1),
padding="same",
activation="tanh", use_bias=True, )(pooling_result)
pooling_result = tf.keras.layers.MaxPooling2D(pool_size=(pooling_width, 1))(conv_result)
flatten_result = tf.keras.layers.Flatten()(pooling_result)
new_result = tf.keras.layers.Dense(pooling_result.shape[1].value * embedding_size * new_filters,
activation="tanh", use_bias=True)(flatten_result)
new_feature_list.append(
After Change
new_result = self.dense_layers[i - 1](flatten_result)
new_feature_list.append(
tf.reshape(new_result, (-1, pooling_result.shape[1].value * new_filters, embedding_size)))
new_features = concat_fun(new_feature_list, axis=1)
return new_features
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
Instances
Project Name: shenweichen/DeepCTR
Commit Name: b787cdf9d9d1c7f500f91ccdeb87aa6d7725ae14
Time: 2019-05-18
Author: wcshen1994@163.com
File Name: deepctr/layers/interaction.py
Class Name: FGCNNLayer
Method Name: call
Project Name: fizyr/keras-retinanet
Commit Name: 37d8d41a0b738fb8a4b9519a6d358c4f7e815382
Time: 2017-11-08
Author: hansg91@gmail.com
File Name: keras_retinanet/models/retinanet.py
Class Name:
Method Name: retinanet_bbox
Project Name: adalca/neuron
Commit Name: cce5b1b460c503dd2bd3288554b0f9fadbbbdb9b
Time: 2019-08-23
Author: adalca@mit.edu
File Name: neuron/models.py
Class Name:
Method Name: single_ae
Project Name: tensorflow/models
Commit Name: cd39fd588a61a23be70bda355ac7fb483ba60e77
Time: 2020-10-13
Author: gardener@tensorflow.org
File Name: official/nlp/modeling/networks/albert_encoder.py
Class Name: AlbertEncoder
Method Name: __init__