Open mhelal opened 2 years ago
Hi Manal,
Thanks for your interest in our package.
To answer your first question, 'TRClassifier' is a Python class, and your 'TRClassifier' has no parameters declared.
You may use:
TRCls = TRClassifier()
Output = TRCls(X_train)
The neural network you defined is called "TRCls," which is distinct from "TRClassifier()."
Regarding your second inquiry, our package does not contain the decomposition implementation. Our package only supports the TR formats for neural network design. However, as far as we know, there is not a python package that supports the tensor ring decomposition algorithm (TR-svd) well. You can try the Matlab package at https://qibinzhao.github.io. You might also find the https://github.com/KhrulkovV/tt-pytorch useful.
For your third question, this is the term used in neural networks. Input shape refers to the input data's feature shape, and output shape means the shape of the feature map after processing.
If you have other questions, feel free to contact us.
Best regards,
Morin
Since this package does not include tensor decomposition algorithms, how can I perform tensor decomposition on layers of neural networks?
Since this package does not include tensor decomposition algorithms, how can I perform tensor decomposition on layers of neural networks?
You can utilize TensorLy for tensor decomposition of the parameter weights and subsequently reload the corresponding tensors into our specified format~(like TT-Layer). Our package exclusively implements these formats, and all our experiments are conducted with random initialization.
Hi
I am trying to implement your MNIST TR classifier:
First, the syntax for passing inputs and outputs is not clear in any of your tutorials. I tried the following without the output yet:
and I am getting the error: TypeError: init() takes 1 positional argument but 2 were given
Second, I would like to do a TR decomposition of a ndarray, such as the TT decomposition syntax elsewhere:
or
I could not find in your APIs something similar to this. Can you please advise, if you have a TR decomposition or any other Python package provided one?
Third, it is not clear to me from the tutorials, how a linear layer takes an input shape, and an output shape, and then a specific rank for what? If you provide an example with some explanations, this will be clearer.
thank you,
Manal