summaryrefslogtreecommitdiff
path: root/ml_exp/do_ml.py
diff options
context:
space:
mode:
authorDavid Luevano Alvarado <55825613+luevano@users.noreply.github.com>2020-03-11 09:07:44 -0700
committerDavid Luevano Alvarado <55825613+luevano@users.noreply.github.com>2020-03-11 09:07:44 -0700
commit384fe4f880fed83e10f676184455466b97f4bb43 (patch)
treed68420e87e0bc170bc5db6d603eb2238222e8e58 /ml_exp/do_ml.py
parent313ea0a0aa654f6be862273a061dabc6a397c6e0 (diff)
Add error handlers
Diffstat (limited to 'ml_exp/do_ml.py')
-rw-r--r--ml_exp/do_ml.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ml_exp/do_ml.py b/ml_exp/do_ml.py
index eb57008b0..b37553c24 100644
--- a/ml_exp/do_ml.py
+++ b/ml_exp/do_ml.py
@@ -121,6 +121,8 @@ def simple_ml(descriptors,
Y_pr = tf.tensordot(K_te, alpha, 1)
mae = tf.reduce_mean(tf.abs(Y_pr - Y_te))
+ else:
+ raise TypeError('No GPU found, could not create Tensor objects.')
else:
X_tr = descriptors[:training_size]
Y_tr = energies[:training_size]