Open gqsmmz opened 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
thanks, I get it!
I found that in the
dataset_train = Traj_dataset(args, "train")
inmain.py
, the read instruction feature isself. 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 theself. 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 elementself. 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?