Skip to content

Commit

Permalink
Edge TPU TF imports fix
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher authored Feb 5, 2022
1 parent cba4303 commit 2a4886a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions models/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,8 @@ def wrap_frozen_graph(gd, inputs, outputs):
try: # prefer tflite_runtime if installed
from tflite_runtime.interpreter import Interpreter, load_delegate
except ImportError:
import tensorflow.lite.experimental.load_delegate as load_delegate
import tensorflow.lite.Interpreter as Interpreter
import tensorflow as tf
Interpreter, load_delegate = tf.lite.Interpreter, tf.lite.experimental.load_delegate,
if 'edgetpu' in w.lower(): # Edge TPU https://coral.ai/software/#edgetpu-runtime
LOGGER.info(f'Loading {w} for TensorFlow Lite Edge TPU inference...')
delegate = {'Linux': 'libedgetpu.so.1',
Expand Down

0 comments on commit 2a4886a

Please sign in to comment.