8wDlpd.png
8wDFp9.png
8wDEOx.png
8wDMfH.png
8wDKte.png

buildozer debug在c4k_tfilte示例代码中失败

jQueeny 7月前

47 0
我想调试C4K_TFILTE示例代码,但我一直遇到错误 C4K_PHOTO和C4K_OPENCV代码正常运行,但只有Tflite不运行 在整个c4k_tflite代码中,我已经完成了

我想调试c4k_tfilte示例代码,但是我一直遇到错误

C4K_PHOTO和C4K_OPENCV代码正常运行,但只有Tflite不运行 在整个c4k_tflite代码中,我完成了运行main.py.py

的包装和Java安装

我将上传错误代码

Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1256, in <module>
    main()
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
    ToolchainCL()
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 685, in __init__
    getattr(self, command)(args)
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 104, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 163, in build_dist_from_args
    build_recipes(build_order, python_modules, ctx,
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 504, in build_recipes
    recipe.build_arch(arch)
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 934, in build_arch
    self.install_python_package(arch)
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 950, in install_python_package
    shprint(hostpython, 'setup.py', 'install', '-O2',
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/python-for-android/pythonforandroid/logger.py", line 167, in shprint
    for line in output:
  File "/home/hhh/.local/lib/python3.10/site-packages/sh.py", line 915, in next
    self.wait()
  File "/home/hhh/.local/lib/python3.10/site-packages/sh.py", line 845, in wait
    self.handle_command_exit_code(exit_code)
  File "/home/hhh/.local/lib/python3.10/site-packages/sh.py", line 869, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1:

  RAN: /home/hhh/c4k_tflite_example/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/native-build/python3 setup.py install -O2 --root=/home/hhh/c4k_tflite_example/.buildozer/android/platform/build-arm64-v8a/build/python-installs/c4k_tflite/arm64-v8a --install-lib=.

  STDOUT:
Traceback (most recent call last):
  File "/home/hhh/.local/bin/cmake", line 5, in <module>
    from cmake import cmake
ModuleNotFoundError: No module named 'cmake'
Traceback (most recent call last):
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/build-arm64-v8a/build/other_builds/pybind11/arm64-v8a__ndk_target_21/pybind11/setup.py", line 117, in remove_output
    yield
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/build-arm64-v8a/build/other_builds/pybind11/arm64-v8a__ndk_target_21/pybind11/setup.py", line 139, in <module>
    subprocess.run(cmd, check=True, cwd=DIR, stdout=sys.stdout, stderr=sys.stderr)
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Lib/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['cmake', '-S', '.', '-B', '/tmp/tmp4iry6ao4', '-DCMAKE_INSTALL_PREFIX=pybind11', '-DBUILD_TESTING=OFF', '-DPYBIND11_NOPYTHON=ON', '-Dprefix_for_pc_file=${pcfiledir}/../../']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/build-arm64-v8a/build/other_builds/pybind11/arm64-v8a__ndk_target_21/pybind11/setup.py", line 123, in <module>
    with remove_output("pybind11/include", "pybind11/share"):
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Lib/contextlib.py", line 155, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/build-arm64-v8a/build/other_builds/pybind11/arm64-v8a__ndk_target_21/pybind11/setup.py", line 120, in remove_output
    shutil.rmtree(src)
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Lib/shutil.py", line 722, in rmtree
    onerror(os.lstat, path, sys.exc_info())
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Lib/shutil.py", line 720, in rmtree
    orig_st = os.lstat(path, dir_fd=dir_fd)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'pybind11/include'


  STDERR:

# Command failed: ['/usr/bin/python3', '-m', 'pythonforandroid.toolchain', 'create', '--dist_name=c4k_tflite', '--bootstrap=sdl2', '--requirements=python3,kivy,camera4kivy,gestures4kivy,numpy,tflite-runtime', '--arch=arm64-v8a', '--copy-libs', '--color=always', '--storage-dir=/home/hhh/c4k_tflite_example/.buildozer/android/platform/build-arm64-v8a', '--ndk-api=21', '--hook=/home/hhh/c4k_tflite_example/camerax_provider/gradle_options.py', '--ignore-setup-py', '--debug']
# ENVIRONMENT:
#     SHELL = '/bin/bash'
#     WSL2_GUI_APPS_ENABLED = '1'
#     WSL_DISTRO_NAME = 'Ubuntu'
#     JAVA_HOME = '/usr/lib/jvm/java-17-openjdk-amd64'
#     NAME = 'DESKTOP-FSUMKEQ'
#     PWD = '/home/hhh/c4k_tflite_example'
#     LOGNAME = 'hhh'
#     HOME = '/home/hhh'
#     LANG = 'C.UTF-8'
#     WSL_INTEROP = '/run/WSL/353_interop'
#     LS_COLORS = 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:'
#     WAYLAND_DISPLAY = 'wayland-0'
#     LESSCLOSE = '/usr/bin/lesspipe %s %s'
#     TERM = 'xterm-256color'
#     LESSOPEN = '| /usr/bin/lesspipe %s'
#     USER = 'hhh'
#     DISPLAY = ':0'
#     SHLVL = '1'
#     ANDROID_SDK_ROOT = '/home/hhh/Android/Sdk'
#     XDG_RUNTIME_DIR = '/run/user/1000/'
#     WSLENV = ''
#     XDG_DATA_DIRS = '/usr/local/share:/usr/share:/var/lib/snapd/desktop'
#     PATH = ('/home/hhh/.buildozer/android/platform/apache-ant-1.9.4/bin:/home/hhh/.local/bin:/usr/lib/jvm/java-8-openjdk-amd64/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program '
 'Files/WindowsApps/MicrosoftCorporationII.WindowsSubsystemForLinux_2.1.4.0_x64__8wekyb3d8bbwe:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Users/HHH/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/HHH/AppData/Local/Programs/Microsoft '
 'VS '
 'Code/bin:/snap/bin:/home/hhh/.local/bin/:/snap/bin/flutter/bin:/usr/bin/java:/usr/lib/jvm/java-17-openjdk-amd64/bin')
#     DBUS_SESSION_BUS_ADDRESS = 'unix:path=/run/user/1000/bus'
#     CLASS_PATH = '/usr/lib/jvm/java-8-openjdk-amd64/lib:'
#     HOSTTYPE = 'x86_64'
#     PULSE_SERVER = 'unix:/mnt/wslg/PulseServer'
#     OLDPWD = '/home/hhh'
#     _ = '/home/hhh/.local/bin/buildozer'
#     PACKAGES_PATH = '/home/hhh/.buildozer/android/packages'
#     ANDROIDSDK = '/home/hhh/.buildozer/android/platform/android-sdk'
#     ANDROIDNDK = '/home/hhh/.buildozer/android/platform/android-ndk-r25b'
#     ANDROIDAPI = '33'
#     ANDROIDMINAPI = '21'
#
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2

上面的信息来自buildozer 执行buildozer -v android debug命令

时出错
帖子版权声明 1、本帖标题: buildozer debug在c4k_tfilte示例代码中失败
    本站网址:http://xjnalaquan.com/
2、本网站的资源部分来源于网络,如有侵权,请联系站长进行删除处理。
3、会员发帖仅代表会员个人观点,并不代表本站赞同其观点和对其真实性负责。
4、本站一律禁止以任何方式发布或转载任何违法的相关信息,访客发现请向站长举报
5、站长邮箱:yeweds@126.com 除非注明,本帖由jQueeny在本站《python》版块原创发布, 转载请注明出处!
最新回复 (0)
  • 目前,我有一个看起来像这样的熊猫数据框架(它最初来自一个大型CSV文件,我包含了一个小片段) ds = pd.dataframe([[([('2020-312T00:00:00.746',2.466000e-15,2.33050 ...

    目前我有一个看起来像这样的pandas dataframe(最初是来自大型CSV文件,最初是来自大型CSV文件,我包括一个小片段)

    ds = pd.DataFrame([('2020-312T00:00:00.746', 2.466000e-15, 2.330500e-15, 2.949800e-15, 7.497400e-15, 3.682900e-15, 6.375300e-15),
                       ('2020-312T00:00:01.746', 1.406300e-14, 1.319700e-14, 6.588400e-15, 5.245300e-15, 4.462600e-15, 6.375300e-15),
                       ('2020-312T00:00:02.746', 9.389400e-15, 7.542200e-15, 5.433000e-15, 2.355100e-15, 7.388700e-15, 3.852900e-15),
                       ('2020-312T00:00:03.746', 5.252700e-15, 4.338100e-15, 6.588400e-15, 5.245300e-15, 2.934300e-15, 6.375300e-15),
                       ('2020-312T00:00:04.746', 5.252700e-15, 9.345600e-15, 3.340000e-15, 5.245300e-15, 8.766700e-15, 4.640600e-15)],
                       columns=['Epoch', ' Freq_1.12E+04', 'Freq_1.25E+04', 'Freq_1.41E+04', 'Freq_1.58E+04', 'Freq_1.77E+04', 
                               'Freq_1.98E+04'])
    ds
    
    

    我使用 new_ds = dso_xarray() 将此数据框架转换为Xarray - “

    我想通过将时期设置为索引来更改此数据集,然后将坐标变为时期和频率。

    并将尺寸更改为时代和频率(X和Y轴resp)。 我该怎么做?
  • 我正在尝试使用HuggingFace的MT5基本模型编码一些文本。 我正在使用模型,如下所示 从变形金刚导入mt5encodermodel,autotokenizer model = mt5encodermodel.from_pretrai ...

    我试图使用HuggingFace的MT5-base模型编码一些文本。

    我正在使用该模型,如下所示
    from transformers import MT5EncoderModel, AutoTokenizer
    
    model = MT5EncoderModel.from_pretrained("google/mt5-base")
    tokenizer = AutoTokenizer.from_pretrained("google/mt5-base")
    
    def get_t5_embeddings(texts):
        last_hidden_state = model(input_ids=tokenizer(texts, return_tensors="pt", padding=True).input_ids).last_hidden_state
        pooled_sentence = torch.max(last_hidden_state, dim=1)
        return pooled_sentence[0].detach().numpy()
    

    我注意到同一文本与自身的相似性得分低时,我正在进行一些实验。

    我做了一些挖掘,并意识到,如果我在批处理中进行编码,则该模型正在返回非常不同的嵌入。 为了验证这一点,我进行了一个小实验,该实验生成了 Hello 的嵌入,并列出了10 Hello s的列表。 并检查 Hello 的嵌入以及列表中的第一个 Hello (这两个都应该相同)。
    for i in range(1, 10):
        print(i, (get_t5_embeddings(["Hello"])[0] == get_t5_embeddings(["Hello"]*i)[0]).sum())
    

    这将返回相互匹配的嵌入式中值数量。

    这就是结果:
    1 768
    2 768
    3 768
    4 768
    5 768
    6 768
    7 768
    8 27
    9 27
    

    每次我运行时,如果批处理大小超过768。

    ,我会感到不匹配。

    为什么我要得到不同的嵌入方式,我该如何修复?

返回
作者最近主题: