Skip to content

Commit

Permalink
Fix structureto3didescriptor returning uninitialized values for maske…
Browse files Browse the repository at this point in the history
…d positions #410
  • Loading branch information
milot-mirdita committed Jan 18, 2025
1 parent b03e21c commit 4aba8c3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/3di/structureto3di.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,19 @@ class StructureTo3Di : StructureTo3DiBase{

struct Feature{
double f[Alphabet3Di::FEATURE_CNT];
Feature(){}
Feature(){
memset(f, 0, sizeof(double) * Alphabet3Di::FEATURE_CNT);
}
Feature(double param_f[Alphabet3Di::FEATURE_CNT]){
memcpy(f, param_f, sizeof(double) * Alphabet3Di::FEATURE_CNT);
}
};

struct Embedding{
double f[Alphabet3Di::EMBEDDING_DIM];
Embedding(){}
Embedding(){
memset(f, 0, sizeof(double) * Alphabet3Di::EMBEDDING_DIM);
}
Embedding(double param_f[Alphabet3Di::EMBEDDING_DIM]){
memcpy(f, param_f, sizeof(double) * Alphabet3Di::EMBEDDING_DIM);
}
Expand Down

0 comments on commit 4aba8c3

Please sign in to comment.