_, dense_input_list = input_from_feature_columns(features,feature_columns,1,l2_reg,init_std,seed,prefix=prefix)
if len(linear_emb_list[0]) > 1:
linear_term = concat_fun([add(linear_emb) for linear_emb in linear_emb_list])
elif len(linear_emb_list[0]) == 1:
linear_term = concat_fun([linear_emb[0] for linear_emb in linear_emb_list])
else:
linear_term = None
if len(dense_input_list) > 0:
dense_input__ = dense_input_list[0] if len(
dense_input_list) == 1 else Concatenate()(dense_input_list)
linear_dense_logit = Dense(
units, activation=None, use_bias=False, kernel_regularizer=l2(l2_reg))(dense_input__)
if linear_term is not None:
linear_term = add([linear_dense_logit, linear_term])
else:
linear_term = linear_dense_logit
return linear_term
def embedding_lookup(sparse_embedding_dict,sparse_input_dict,sparse_feature_columns,return_feat_list=(), mask_feat_list=()):
embedding_vec_list = []
for fc in sparse_feature_columns:
After Change
raise NotImplementedError
linear_logit_list.append(linear_logit)
return concat_fun(linear_logit_list)
def embedding_lookup(sparse_embedding_dict,sparse_input_dict,sparse_feature_columns,return_feat_list=(), mask_feat_list=()):
embedding_vec_list = []
for fc in sparse_feature_columns: