diff options
author | David Luevano Alvarado <55825613+luevano@users.noreply.github.com> | 2020-03-11 09:07:44 -0700 |
---|---|---|
committer | David Luevano Alvarado <55825613+luevano@users.noreply.github.com> | 2020-03-11 09:07:44 -0700 |
commit | 384fe4f880fed83e10f676184455466b97f4bb43 (patch) | |
tree | d68420e87e0bc170bc5db6d603eb2238222e8e58 /ml_exp/kernels.py | |
parent | 313ea0a0aa654f6be862273a061dabc6a397c6e0 (diff) |
Add error handlers
Diffstat (limited to 'ml_exp/kernels.py')
-rw-r--r-- | ml_exp/kernels.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ml_exp/kernels.py b/ml_exp/kernels.py index 599487b3a..2b40ae0b1 100644 --- a/ml_exp/kernels.py +++ b/ml_exp/kernels.py @@ -87,6 +87,8 @@ def laplauss_kernel(X1, i_state = (0, K) n, K = tf.while_loop(cond, body, i_state) K = K.stack() + else: + raise TypeError('No GPU found, could not create Tensor objects.') else: K = np.zeros((X1_size, X2_size), dtype=np.float64) # Faster way of calculating the kernel (no numba support). |