Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove/change the default "target" layer option for losses #521

Open
albertz opened this issue May 21, 2021 · 4 comments
Open

Remove/change the default "target" layer option for losses #521

albertz opened this issue May 21, 2021 · 4 comments
Labels
potential-new-behavior Discussions about RETURNN behaviour

Comments

@albertz
Copy link
Member

albertz commented May 21, 2021

#508

Effectively this means changing Loss.get_default_target() (because each loss class already can define its own default). The base function currently has this implementation:

  @classmethod
  def get_default_target(cls, extern_data):
    """
    :param TFNetwork.ExternData extern_data:
    :return: default target name, or None if this loss does not have a target
    :rtype: str|None
    """
    if not cls.need_target:
      return None
    return extern_data.default_target

The extern_data.default_target can be configured by the user via default_target in the config, and by default it is "classes".

Maybe just completely remove this function. So for losses which need a target (have need_target set), we explicitly require the target. So then effectively there is no default "classes" anymore.

@albertz albertz added the potential-new-behavior Discussions about RETURNN behaviour label May 21, 2021
@albertz
Copy link
Member Author

albertz commented May 25, 2021

This here is a case where we do not necessarily need a new behavior_version and instead could just print a deprecation warning.

@Atticus1806

This comment has been minimized.

@albertz

This comment has been minimized.

@Atticus1806

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
potential-new-behavior Discussions about RETURNN behaviour
Projects
None yet
Development

No branches or pull requests

2 participants