https://github.com/GPflow/GPflow
Revision 056e59f2c5aa2b5021de9b7b91ce1cee2ea0bb92 authored by st-- on 06 February 2020, 17:06:04 UTC, committed by GitHub on 06 February 2020, 17:06:04 UTC
Parameter.__repr__ called .numpy() on the constrained and unconstrained representations - this throws an error when in graph mode (tf.function-wrapped), which can lead to errors-in-exception-handling, so this PR makes use of tf.eagerly_executing() to check whether we are in graph mode, and if so, only print shapes and dtype, not values.
1 parent 8dbf7ad
Raw File
Tip revision: 056e59f2c5aa2b5021de9b7b91ce1cee2ea0bb92 authored by st-- on 06 February 2020, 17:06:04 UTC
fix Parameter.__repr__ behaviour within tf.function/graph mode (#1247)
Tip revision: 056e59f
.gitignore
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
#  Usually these files are written by a python script from a template
#  before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover

# Translations
*.mo
*.pot

# Django stuff:
*.log

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Emacs backups
*~

# Pycharm IDE directory
.idea

# IPython Notebooks
.ipynb_checkpoints

# VSCode
.vscode

# OSX
.DS_Store
back to top