tensorly实现张量的展开及逆过程
import tensorly as tl
import numpy as np
a = np.array([[[1,2,3,4],[4,5,6,7],[7,8,9,10]],
[[11,12,13,14],[20,21,22,23],[15,16,17,18]]])
print(a.shape)
b = tl.unfold(a,mode=0) #实现1模展开
print...
原创
2019-05-25 16:55:47 ·
2258 阅读 ·
0 评论