swift - Swift for TensorFlow `错误:无法查找符号:TensorFlow.Tensor 的类型元数据访问器`
问题描述
以下几行 -
import TensorFlow
let matrix = Tensor<Float>([[1, 2], [3, 4]])
在 macOS 操场上执行会产生错误 -
error: Couldn't lookup symbols:
type metadata accessor for TensorFlow.Tensor
protocol witness table for TensorFlow.Tensor<A> : TensorFlow.TensorArrayProtocol in TensorFlow
type metadata accessor for TensorFlow.TensorElementLiteral
protocol witness table for TensorFlow.TensorElementLiteral<A> : TensorFlow.TensorArrayProtocol in TensorFlow
protocol conformance descriptor for <A where A: TensorFlow.TensorArrayProtocol> Swift.Array<A> : TensorFlow.TensorArrayProtocol in TensorFlow
protocol witness table for Swift.Float : TensorFlow.TensorFlowScalar in TensorFlow
_TFE_DeleteOp
_TFE_NewOp
_TFE_OpSetAttrInt
_TFE_OpSetAttrType
_TF_DeleteStatus
_TF_NewStatus
___tf_tensor_from_scalar
__swift_tfc_CheckOk
__swift_tfc_CreateTensorHandleFromC
__swift_tfc_EagerExecute
__swift_tfc_GetGlobalEagerContext
__swift_tfc_OpAddInputFromTensorGroup
__swift_tfc_OpSetDeviceFromScope
Xcode 10.2,Swift for TensorFlow 版本 0.2,2019-03-02
关于如何解决这个问题的任何想法?
PS 0.3、2019-04-23 工具链也存在该问题。
解决方案
好的,这似乎是一个已知问题 - https://github.com/tensorflow/swift/issues/173
推荐阅读
- r - 如何在具有多个列对的数据框中按名称连接两对列并移动行
- python - 如何通过已知坐标找到四边形的角
- javascript - 如何接收博客文章数据
- c - 从 Unix 域套接字读取整数个 SOCK_SEQPACKET 消息
- vue.js - nuxt 链接需要两次点击才能更正路径
- android - 自由形式多窗口模式活动定位不起作用
- c - 在 openssl CLI 和 C codeHello 之间获取不同的加密字符串
- python - ValueError:x 和 y 必须具有相同的第一维,但具有形状 (100,) 和 (396,)
- typescript - 如何使用 Yarn 2.0 的链接启用 VS Code 自动导入:协议和 Typescript
- python - Python Pandas Dataframe 丰富(来自另一个)