Skip to content

Commit c22a226

Browse files
afrozenatorcopybara-github
authored andcommitted
Fix glow invertibility test with latest lapack version.
PiperOrigin-RevId: 397344660
1 parent 0dd16b9 commit c22a226

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

.travis.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
sudo: required
2+
language: python
3+
cache: pip
4+
git:
5+
depth: 3
6+
quiet: true
7+
services:
8+
- docker
9+
python:
10+
- "3.6"
11+
env:
12+
global:
13+
- T2T_PROBLEM=algorithmic_reverse_binary40_test
14+
- T2T_DATA_DIR=/tmp/t2t-data
15+
- T2T_TRAIN_DIR=/tmp/t2t-train
16+
- TF_LATEST="1.15.*"
17+
# This is necessary to have gsutil work with Python 2.7
18+
- BOTO_CONFIG=/dev/null
19+
matrix:
20+
- TF_VERSION="1.15.*"
21+
install:
22+
- ./oss_scripts/oss_pip_install.sh
23+
script:
24+
- ./oss_scripts/oss_tests.sh
25+
- ./oss_scripts/oss_integration_test.sh
26+
27+
# Conditional commands should each be in a separate block to get proper
28+
# errors on Travis.
29+
#
30+
# TODO(afrozm): Re-enable if this becomes an issue.
31+
# - if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
32+
# pylint -j 2 tensor2tensor;
33+
# fi

tensor2tensor/layers/transformer_glow_layers_test.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ def test_flow_invertibility(self):
245245
[x, x_mask, x_inv, x_inv_inv, logabsdet, logabsdet_inv]))
246246
diff = x - x_inv_inv
247247
logabsdet_sum = logabsdet + logabsdet_inv
248-
self.assertTrue(np.allclose(diff, 0.0, atol=1e-5))
249-
self.assertTrue(np.allclose(logabsdet_sum, 0.0, atol=1e-5))
248+
self.assertTrue(np.allclose(diff, 0.0, atol=2e-5))
249+
self.assertTrue(np.allclose(logabsdet_sum, 0.0, atol=2e-5))
250250

251251
@parameterized.parameters(
252252
("1", "cat", "affine"),

0 commit comments

Comments
 (0)