Skip to content

Tensorflow 2 C&W2 implementation targeted bug #1228

@ugorsahin

Description

@ugorsahin

Hello, I have seen one possible bug in the tensorflow C&W2 implementation.

The targeted parameter does not pass to function body, instead it is defined with respect to y parameter being None or not. This causes problems when labels are explicitly given in untargeted scenario.


self.targeted = y is not None

There might be two ways to fix this:

  • One would be
    self.targeted = targeted
  • The other solution would be replacing default value of targeted to None and fixing line
    targeted = None
    on the argument list and
if targeted is not None:
    self.targeted=targeted
else:
    self.targeted = y is not None

in the body

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions