python - OSError:无法打开文件(未找到文件签名)h5 文件
问题描述
我正在尝试读取 h5 文件
# Reads the Training data file. However, this just reads the speaker list data required for encoding the targets with scikit-learn block "LabelEncoder".
dataServer = h5py.File('Librispeech_960_train_list.h5', 'r')
sLabels=dataServer['lSpeaker'][:]
encoder_spk = LabelEncoder()
encoder_spk.fit(sLabels)
num_spk_class=np.unique(sLabels).shape[0]
但我收到此错误:
File "h5py\_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py\h5f.pyx", line 85, in h5py.h5f.open
OSError: Unable to open file (file signature not found)
我得到了这个 OSError 但我不知道如何解决它
解决方案
推荐阅读
- android - 当应用程序未运行时,不在状态栏上显示推送通知(Firebase 云消息)
- html - 试图产生褪色的利润
- ios - 在 iOS 中使用 webview 时出现 Jumio netvrify 错误。浏览器不支持摄像头
- c++ - 如果被指针引用,非动态变量何时超出范围?
- html - DotNetBrowser 视频捕获不工作
- python - 熊猫数据框如何基于groupby合并所有行
- reactjs - 使用 Next.js 动态 url 停止热重载
- sql - 基于条件的 SQL 透视列
- charts - AnyChart 轴旋转和标签定位
- mule - 是否可以将超链接与 mule 4 响应中的字符串相关联?