Skip to content

feat: use member field instead of hard-code#1567

Merged
Adel-Moumen merged 1 commit into
speechbrain:developfrom
xin-w8023:feat/code-style-fixing
Sep 12, 2022
Merged

feat: use member field instead of hard-code#1567
Adel-Moumen merged 1 commit into
speechbrain:developfrom
xin-w8023:feat/code-style-fixing

Conversation

@xin-w8023

Copy link
Copy Markdown
Contributor

fix #1451 It's better to use member filed self.positive_label than hard code to 1.

@xin-w8023

Copy link
Copy Markdown
Contributor Author

@Adel-Moumen Hi this PR aims to address issue #1451

@anautsch anautsch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@Adel-Moumen lgtm

The proposed change relates to lines 321-323, where self.positive_label is initialized - subsequently, it can also be used later on, as demonstrated in this PR.

    def __init__(self, positive_label=1):
        self.clear()
        self.positive_label = positive_label

@Adel-Moumen

Copy link
Copy Markdown
Collaborator

Lgtm.

@Adel-Moumen Adel-Moumen merged commit fe16ffc into speechbrain:develop Sep 12, 2022
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.

Code Style Fixing

3 participants