tensorflow / tensorflow/probability

Keyword argument overload (?) in tfb.real_nvp_default_template

Open
#350 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue keras layers
Dominant language
Jupyter Notebook
Stars
4.4k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Let's say one wants to implement NICE using tfb.real_nvp_default_template as suggested in tfb.RealNVP's documentation. Then, one needs to specify different activation function for output layer (linear) and different one for all of the hidden layers (relu).

  • The documentation of tfb.real_nvp_default_template suggests that one can set an argument activation for the coupling function(s) created by this template function, while one can also pass keyword arguments **kwargs down to the Dense layers of this MLP network.

  • Both tf.layers.Dense (TF 1.x) and tf.keras.layers.Dense (TF 2.x) take argument activation.

From docs it is a bit unclear whether flexibility to specify different activations for output / hiddens is just omitted (and one that is specified applies to all layers of the MLP) or is intended but missing.

Thanks for any clarification!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at tfb.real_nvp_default_template and compare its documentation with the linked RealNVP guidance and the Dense activation arguments in the referenced TensorFlow 1.x and 2.x APIs. Determine whether activation applies to every layer or whether separate hidden and output activations are supported. Done means the documented behavior and any supported configuration are unambiguous.

Written by the indexing model from the issue text.

Assessment

Tech stack
tensorflow
Domain
documentation, machine-learning
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.