会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
qwangg
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
下一页
2023年3月9日
__call__()
摘要: 在一个类中定义__call__方法,使得它的实例能够像函数一样接受参数,并返回结果。 点击查看代码 class MyClass: def __init__(self): self.x = 0 def __call__(self, a, b): self.x = a + b return self.x
阅读全文
posted @ 2023-03-09 09:50 不要肥宅
阅读(46)
评论(0)
推荐(0)
2023年3月8日
whisper转onnx
摘要: 只需要转化模型即可。(nn.module) encoder decoder 检测模型正确性: import onnx onnx_model = onnx.load("/home/mgtv/test_whisper/onnx/medium/whisper_decoder.onnx") onnx.che
阅读全文
posted @ 2023-03-08 16:11 不要肥宅
阅读(1425)
评论(0)
推荐(1)
调用torch.randn(1, n_mels, 3000).to(device)时报错RuntimeError: CUDA error: device-side assert triggered
摘要: 调试Whisper时,不管执行什么命令都会报错RuntimeError: CUDA error: device-side assert triggered 问题 这个错误通常意味着CUDA运行时检测到了某些问题,例如尝试访问不存在的内存地址或尝试在CUDA内核中进行非法操作等。可能的原因包括: CU
阅读全文
posted @ 2023-03-08 11:04 不要肥宅
阅读(2328)
评论(0)
推荐(0)
2023年3月7日
AttributeError: module 'numpy' has no attribute 'object'm.object was a deprecated alias for the builtin object
摘要: 错误描述:numpy版本太高,不支持np.object, np.bool, np.int,需要对应改成np.object_, np.bool_, np.int_或object、np.int32, np.int64 或者可以 在报错前patch/ monkey patch import numpy a
阅读全文
posted @ 2023-03-07 18:13 不要肥宅
阅读(2011)
评论(0)
推荐(0)
Whisper
摘要: 模型理解 model.py ModelDimensions的含义如下: n_mels:Mel频率的数量,用于音频处理,通常设置为80。 n_audio_ctx:输入音频的上下文大小,即处理音频的窗口大小,通常设置为1500。 即音频帧的数量,指定了模型在处理音频时要考虑多少帧的上下文。在每个时间步,
阅读全文
posted @ 2023-03-07 17:50 不要肥宅
阅读(2343)
评论(2)
推荐(0)
**传递字典参数
摘要: Python中的**语法用于解压缩字典,并将其key-value对作为关键字参数传递给函数或构造函数。 点击查看代码 my_dict = {"arg1": 10, "arg2": "hello", "arg3": True} my_function(**my_dict) # 等价于 my_funct
阅读全文
posted @ 2023-03-07 17:36 不要肥宅
阅读(27)
评论(0)
推荐(0)
2023年3月6日
ffmpeg使用
摘要: ffmpeg -ss 00:01:00 -i /mnt/cluster/lynch/576460752303462911.mp4 -t 00:05:00 -c copy /home/mgtv/test_whisper/test4.mp4 ffmpeg -i 'xxx/test2.mp4' -acod
阅读全文
posted @ 2023-03-06 17:23 不要肥宅
阅读(18)
评论(0)
推荐(0)
2023年3月3日
WeNet调试
摘要: 运行: 参照:markdown 问题: CMake Error: Error: generator : Ninja Ninja:提高构建速度 wenet/runtime/libtorch/fc_base/libtorch-src/lib/libtorch_cuda_cpp.so: undefined
阅读全文
posted @ 2023-03-03 18:07 不要肥宅
阅读(98)
评论(0)
推荐(0)
linux更新cmake(无需删除旧版本)
摘要: 旧版本:3.15 新版本:3.22.1 下载新版本 https://cmake.org/files/ 手动下载或使用wget wget https://cmake.org/files/v3.22/cmake-3.22.1.tar.gz 解压 tar -xvzf cmake-3.22.1.tar.gz
阅读全文
posted @ 2023-03-03 16:12 不要肥宅
阅读(1658)
评论(0)
推荐(0)
2023年3月2日
linux常用指令
摘要: - ls - list - ln -s 建立软链接 - unlink xxx 或 rm xxx 删除软链接 {不建议使用 rm -rf xxx 写成 rm -rf xxx/会把原文件夹删掉} - rm -rf /root/xx 删除文件夹并向下渗透 - rm -f /root/logs/game/n
阅读全文
posted @ 2023-03-02 15:51 不要肥宅
阅读(18)
评论(0)
推荐(0)
上一页
1
2
3
4
下一页
公告