不要保存为 .npy(已腌制),而是保存 NumPy 中的原始数据:
array.astype(np.float32).tofile(filename)
Run Code Online (Sandbox Code Playgroud)
现在,您可以简单地将其加载到 Swift 中的 Data 对象中,并将其复制到 MLMultiArray 中。
归档时间: |
|
查看次数: |
497 次 |
最近记录: |