Swift for TensorFlow`错误:无法查找符号:为TensorFlow.Tensor输入元数据访问器

问题描述 投票:0回答:1

以下行 -

import TensorFlow
let matrix = Tensor<Float>([[1, 2], [3, 4]])

在macOS playground中执行产生错误 -

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 Release 0.2,2019-03-02

关于如何解决这个问题的任何想法?

附:使用0.3,2019-04-23工具链时问题仍然存在。

swift xcode tensorflow swift-playground swift-for-tensorflow
1个回答
0
投票

好吧,这似乎是一个已知的问题 - https://github.com/tensorflow/swift/issues/173

© www.soinside.com 2019 - 2024. All rights reserved.