recommenders-team/recommenders

[ASK] Multinomial VAE not working

Open

#1 915 ouverte le 7 avr. 2023

Voir sur GitHub
 (4 commentaires) (0 réactions) (0 assignés)Python (2 972 forks)batch import
help wanted

Métriques du dépôt

Stars
 (17 706 stars)
Métriques de merge PR
 (Merge moyen 6j 16h) (10 PRs mergées en 30 j)

Description

Description

I am running Multinomial VAE on movielens 1m dataset as given in the example notebook but getting an error when fitting the model. The line of code is -

with Timer() as t: model_without_anneal.fit(x_train=train_data, x_valid=val_data, x_val_tr=val_data_tr, x_val_te=val_data_te_ratings, # with the original ratings mapper=am_val ) print("Took {} seconds for training.".format(t))

and the corresponding error is -

Error message - TypeError: You are passing KerasTensor(type_spec=TensorSpec(shape=(), dtype=tf.float32, name=None), name='Placeholder:0', description="created by layer 'tf.cast_8'"), an intermediate Keras symbolic input/output, to a TF API that does not allow registering custom dispatchers, such as tf.cond, tf.function, gradient tapes, or tf.map_fn. Keras Functional model construction only supports TF API calls that do support dispatching, such as tf.math.add or tf.reshape. Other APIs cannot be called directly on symbolic Kerasinputs/outputs. You can work around this limitation by putting the operation in a custom Keras layer call and calling that layer on this symbolic input/output.

Please guide what can be done about this. Thank you.

Other Comments

Guide contributeur