jacobgil / pytorch-tensor-decompositions

PyTorch implementation of [1412.6553] and [1511.06530] tensor decomposition methods for convolutional layers.
https://jacobgil.github.io/deeplearning/tensor-decompositions-deep-learning
278 stars 63 forks source link

Error with torch 2.0.1+cu118 and tenderly 0.8.1 #12

Open MYOUSSF opened 1 year ago

MYOUSSF commented 1 year ago

I'm getting the following error when trying to run tucker decomposition:

ValueError Traceback (most recent call last) in <cell line: 3>() 1 print(' Before the decomposition:') 2 print(layer) ----> 3 layer_tucker_decomposed = tucker_decomposition_conv_layer(layer, ranks=[16, 16]) 4 print('\n After the decomposition:') 5 print(layer_tucker_decomposed)

in tucker_decomposition_conv_layer(layer, ranks) 5 returns a nn.Sequential object with the Tucker decomposition. 6 """ ----> 7 core, [last, first] = partial_tucker(layer.weight.data, modes=[0, 1], rank=ranks, init='svd') 8 9 # A pointwise convolution that reduces the channels from S to R3

ValueError: too many values to unpack (expected 2)