tensorflow / tensorflow/probability
AutoregressiveNetwork cannot be passed to tfa SpectralNormalization
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 4.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
If I pass a AutoregressiveNetwork object to a tfa SpectralNormalization layer (https://www.tensorflow.org/addons/api_docs/python/tfa/layers/SpectralNormalization) then I get the following error:
AutoregressiveNetwork object has no attribute 'kernel' nor 'embeddings'
AutoregressiveNetwork has a kernel. As such, it should be straightforward to be able to apply spectral normalisation to the kernel as at its core, an autoregressive network is a feedforward (dense) network with masking and tfa SpectralNormalization is known to work with keras dense layers.
Perhaps, unlike in a dense layer, the kernel of AutoregressiveNetwork is not made available through an attribute called 'kernel'?
Any suggestions on how to proceed would be very much appreciated. To repo, one can add spectral normalisation to any code using AutoregressiveNetwork such as the one here: https://www.tensorflow.org/probability/api_docs/python/tfp/bijectors/AutoregressiveNetwork.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the AutoregressiveNetwork and tfa SpectralNormalization API documentation, then reproduce the error using the linked TensorFlow Probability example. Trace how SpectralNormalization looks for a kernel or embeddings attribute; done means an AutoregressiveNetwork can be passed to the layer without the reported attribute error.
Written by the indexing model from the issue text.
Assessment
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100