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 (将#修改为@)