Точность пользовательской модели .tflite
можно измерить с помощью инструмента для измерения точности TFLite .
Если вы используете версию mobilenet_v1_1.0_224 (как , определенную в демо ), то вы можете проверить ее точность на странице размещенных моделей . Для V1 точность топ-5 составляет ~ 89,9%
You can't rely on introspection of loaded modules, because sub-packages may not have been loaded. You'll have to look at the filesystem, assuming the top level package in question is not an egg, zip file, extension module, or loaded from memory.
def get_subpackages(module):
dir = os.path.dirname(module.__file__)
def is_package(d):
d = os.path.join(dir, d)
return os.path.isdir(d) and glob.glob(os.path.join(d, '__init__.py*'))
return filter(is_package, os.listdir(dir))
На основе ответа Джеймса Эмертона:
def find_subpackages(module):
result=[]
for thing in os.listdir(os.path.dirname(module.__file__)):
full=os.path.join(os.path.dirname(module.__file__),thing)
if os.path.isdir(full):
if glob.glob(os.path.join(full, '__init__.py*'))!=[]:
result.append(thing)
return result