Skip to content
This repository was archived by the owner on Oct 31, 2025. It is now read-only.

RuntimeError with TFLite models #63

@captain-pool

Description

@captain-pool

Player crashes suddenly when TFLite inference is requested instead of SavedModel inference.
$ python3 player.py --file video.mp4 --tflite compressed_esrgan.tflite

Log

Traceback (most recent call last):
  File "player.py", line 208, in <module>
    player.run()
  File "player.py", line 172, in run
    self.fetch_video()
  File "player.py", line 125, in fetch_video
    video = self.video_second()
  File "player.py", line 115, in video_second
    frames = pool.map(resolution_fn, frames)
  File "/usr/lib/python3.5/multiprocessing/pool.py", line 260, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/usr/lib/python3.5/multiprocessing/pool.py", line 608, in get
    raise self._value
  File "/usr/lib/python3.5/multiprocessing/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "/usr/lib/python3.5/multiprocessing/pool.py", line 44, in mapstar
    return list(map(*args))
  File "player.py", line 70, in tflite_super_resolve
    self.interpreter.invoke()
  File "/home/rick/tf2.0/env/lib/python3.5/site-packages/tensorflow/lite/python/interpreter.py", line 303, in invoke
    self._ensure_safe()
  File "/home/rick/tf2.0/env/lib/python3.5/site-packages/tensorflow/lite/python/interpreter.py", line 123, in _ensure_safe
    data access.""")
RuntimeError: There is at least 1 reference to internal data
      in the interpreter in the form of a numpy array or slice. Be sure to
      only hold the function returned from tensor() if you are using raw
      data access.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions