whcpumpkin / Demand-driven-navigation

Find What You Want: Learning Demand-conditioned Object Attribute Space for Demand-driven Navigation
43 stars 1 forks source link

Why is the feature in the instruction_bert_feature.json is this? #8

Open gqsmmz opened 1 month ago

gqsmmz commented 1 month ago

I found that in the dataset_train = Traj_dataset(args, "train") in main.py, the read instruction feature is self. substructure_feature [instruction] [1] [0] [0].

According to the understanding, a sentence such as "I need a comfortable place to sit." should obtain [1,7,1024] feature values through the BERT Large model, but the self. substructure_feature ["I need a comfortable place to sit."] [1] [0] is [10,1024] feature value, and other sentences will also have 3 more values than the actual number of times. Is it because two double quotes ("") and a period ( . ) are added ?

And what data is self. substructure_feature [instruction] [0]?

Shouldn't we take all the features of self. substructure_feature [instruction] [1] [0] as input when reading the entire sentence? Why only take the zeroth element self. substructure_feature [instruction] [1] [0] as input? What feature does this zeroth element represent?

When I take both self. substructure_feature [instruction] [1] [0] as input, the following error occurs. It may be due to insufficient memory. Is this the reason why you only read the zeroth element? But can the zeroth element represent the characteristics of the entire sentence?

image

whcpumpkin commented 1 month ago

Hi, I have some forgotten how I saved bert features. Unfortunately, the HDD that saves the original extracted feature code seems to be corrupt (looks like a SATA cable issue), I'll do a replacement as soon as I can and get back to you with more details.

I should have done a pooling operation on the features of the sentence, like this: https://github.com/whcpumpkin/Demand-driven-navigation/issues/5#issuecomment-2041277518

gqsmmz commented 1 month ago

thanks, I get it!