Skip to content

Commit

Permalink
Merge pull request #45 from PathwayCommons/development
Browse files Browse the repository at this point in the history
Use mixed precision
  • Loading branch information
jvwong authored May 26, 2022
2 parents b18897f + 08a64ea commit f033f9d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pathway_abstract_classifier/pathway_abstract_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
import ktrain
from cached_path import cached_path

from tensorflow.keras import mixed_precision # erroneous missing import
import tensorflow as tf

if len(tf.config.list_physical_devices('GPU')) > 0:
mixed_precision.set_global_policy('mixed_float16')


class Prediction(NamedTuple):
document: Dict[str, str]
Expand Down

0 comments on commit f033f9d

Please sign in to comment.