question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Replace `config.output_hidden_states` parameter with function argument `output_hidden_states`

See original GitHub issue

🚀 Feature request

Currently the user has to decide whether the model should output the hidden states when she/he creates the config of a model: config.output_hidden_states = True/False. It would be nice if the user can decide this when calling the models forward() / call() with a flag output_hidden_states. This should be done for all TF and PT models that can output hidden states.

A very similar recent change was done for the variable config.output_past -> see PR:https://github.com/huggingface/transformers/pull/3734

Motivation

The user has more flexibility when the hidden states should be output or not.

Your contribution

If someone feels like contributing to the library, this would be a great first PR. I’m very happy to guide the contributor through the PR!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
gaurav-singh1998commented, May 24, 2020

Okay, no issues @drjosephliu I’ll find some other good first issues to solve.

1reaction
stefan-itcommented, May 21, 2020

I think this could have side effects for libraries that use config.output_hidden_states, so I’m cc’ing @Timoeller and @brandenchan, because this parameter is used in FARM.

Read more comments on GitHub >

github_iconTop Results From Across the Web

change a functions argument's values? - java - Stack Overflow
Consider a slightly different example: public class Test { public static void main(String[] args) { boolean in = false; truifier(in); System.out.println("in ...
Read more >
Rest parameters - JavaScript - MDN Web Docs
The rest parameter syntax allows a function to accept an indefinite number of arguments as an array, providing a way to represent variadic ......
Read more >
about Functions Advanced Parameters - PowerShell
Explains how to add parameters to advanced functions.
Read more >
How To Use *args and **kwargs in Python 3 - DigitalOcean
We can pass a variable number of arguments to a function by using ... and y as function parameters, and instead replacing them...
Read more >
Using Python Optional Arguments When Defining Functions
Since functions represent actions, it's a best practice to start your function names with a verb to make your code more readable. Remove...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found