Skip to content

Refactor to conform to the general practice used#184

Open
mengf821 wants to merge 1 commit intocastorini:masterfrom
mengf821:refactor_sm_cnn
Open

Refactor to conform to the general practice used#184
mengf821 wants to merge 1 commit intocastorini:masterfrom
mengf821:refactor_sm_cnn

Conversation

@mengf821
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown
Member

@Victor0118 Victor0118 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

sent1, sent2 = self.get_sentence_embeddings(batch)

output = self.model(sent1, sent2, batch.ext_feats, batch.dataset.word_to_doc_cnt, batch.sentence_1_raw, batch.sentence_2_raw)
if hasattr(self.model, 'skip_embedding_lookup') and self.model.skip_embedding_lookup:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why there are two conditions here? What if only one condition is True?


# Select embedding
sent1, sent2 = self.get_sentence_embeddings(batch)
if hasattr(self.model, 'skip_embedding_lookup') and self.model.skip_embedding_lookup:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants