RecBole icon indicating copy to clipboard operation
RecBole copied to clipboard

How can I load the images or their embeddings in a model that allows for it, let's say GRU4RecF?

Open MuthanaA opened this issue 2 years ago • 1 comments

I've been trying to find a way for the model to load the images that I have, but I can't seem to find that anywhere.

MuthanaA avatar May 04 '22 04:05 MuthanaA

Hi, sorry for the late reply. Maybe there are two ways that you can consider:

  1. Flatten the RGB values of an image (or its embedding) and store them as a type of float_seq in the input atomic files. While in the model, you can restore the shape of the Tensors. This solution is more general, once you have processed the dataset, it can be used by many algorithms. But maybe it's kind of time-consuming.
  2. Code the hard rules in the __init__ of your model. In this way, the images and embeddings can be stored as they are, but you need to hand the remap issue. Please try to call dataset.field2id_token to find the remap relations.

hyp1231 avatar May 08 '22 07:05 hyp1231

Hello @MuthanaA! Thanks for your attention and kindly advice!

Closing due to inactivity. Please open a new issue if you're still having questions.

The suggestions and feedback from open source users are our driving force for continuous updating. We welcome you very much to use our library again and give your valuable comments.

Sherry-XLL avatar Feb 09 '23 08:02 Sherry-XLL