fickaz / TFRS-on-Retail-Data

Tensorflow Recommenders with Example on Retail Data
19 stars 16 forks source link

Tensorflow 2.6+ compatibility #1

Open parnell opened 2 years ago

parnell commented 2 years ago

Hi, I noticed that the code is built for Tensorflow 2.4. I was curious to know if you have any plans to update it for TF 2.6 or above?

In particular the tf.concat seems like it would break as the tensor sizes would be different. `
def call(self, inputs):

Take the input dictionary, pass it through each input layer,

    # and concatenate the result.
    return tf.concat([
        self.user_embedding(inputs["user_id"]),
        self.timestamp_embedding(inputs["timestamp"]),
        self.normalized_timestamp(inputs["timestamp"]),
        self.city_embedding(inputs["customer_city"]),
        self.city_text_embedding(inputs["customer_city"]),
        self.category_embedding(inputs["product_category"]),
        self.category_text_embedding(inputs["product_category"]),

self.category_embedding(['product_category'])

    ], axis=1)

`

Thanks