如何解决Tensorflow中的特征脸
我试图用张量流在特征面上添加高度和宽度,但是不确定函数/代码是对还是错? 我知道,在numpy中,代码是:
enter code here
#Eigen-decomposition
S,U,V = tf.linalg.svd(X_train,name=None)
components = V[:n_components]
eigenfaces =
components.tf.reshape(n_components,h,w)
但是,它会产生以下错误: AttributeError Traceback(最近一次通话) 在 ----> 1个本征面= components.tf.reshape(n_components,h,w) AttributeError:“ tensorflow.python.framework.ops.EagerTensor”对象没有属性“ tf”。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。