Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explanation of parameters #1

Open
daniel-unyi-42 opened this issue Feb 28, 2022 · 9 comments
Open

Explanation of parameters #1

daniel-unyi-42 opened this issue Feb 28, 2022 · 9 comments

Comments

@daniel-unyi-42
Copy link

daniel-unyi-42 commented Feb 28, 2022

Hi!
Could you explain shortly the role of the following parameters in GemResNetBlock: in_order, out_order, n_rings?
I'm not sure how to set these parameters.
My dataset consists of mesh samples with scalar features.

@pimdehaan-qc
Copy link

Hi Daniel,
Thanks for asking your question. Both the order and n_rings are hyperparameters you can tune. The orders correspond to the kind of representations of the group SO(2) used. Order 2 would e.g. correspond to the sum of the zeroth, first and second irreducible representations (see the paper). If your input and output are scalar features, you want order zero as input and output. For the intermediate layer's in/output, I'd recommend using 1 or 2. The out_order of one layer should equal the in_order of the next. The rings correspond to the kernel size of a normal CNN. I'd recommend starting with 2 or 3.
Hope that helps. Let me know if you have further questions.
Best wishes,
Pim

@daniel-unyi-42
Copy link
Author

Thank you for the answer, it's really helpful.

@daniel-unyi-42
Copy link
Author

I have one more question.
What do you suggest if I have both scalar & vector inputs?
Should I have two separate input layers, both of which output an order N representation, and sum/concatenate them?

@pimdehaan-qc
Copy link

Hi,
Recall that an order 1 feature consist of a scalar and a tangent 2 vector, in the local basis / frame / gauge.

Do you have a 2 vector on the surface and a scalar or a 3 vector in the ambient space and a scalar?
In the first case, if you express the 2 vector in the basis at each point, you can simply concatenate the scalar with the vector to create an order 1 feature. In the second case, you first need to split the 3 vector into a tangent 2 vector and a normal component, which is another scalar feature. You can combine that with the other scalar feature to create two channels of an order 1 feature, where you set the other 2 vector to zero.
This requires some linear algebra. Let me know if I can help with that.

Pim

@daniel-unyi-42
Copy link
Author

Thank you! So, if I understand correctly, I have to transform the vector feature at each vertex to the local basis.
And I use my scalar features as order-1 features, whose tangent 2-vectors are zero vectors.

I have yet another question. I also have the vertex positions. Should I explicitly append vertex positions to the input features as you did in the GeometricShapes example?

@pimdehaan-qc
Copy link

Yes, that's correct, the order 1 feature is 3D and consists of a scalar and a 2 vector and you can combine data into that by zero padding. The XYZ coords are scalar features, but be aware that using them as such breaks global equivariance.
Pim

@daniel-unyi-42
Copy link
Author

What do you suggest if I don't want to break global equivariance, but still want to take vertex positions into account?
Modify the layer such that K_neigh(r, θ) = F(r) * K_neigh(θ) as you mention in the paper?

@Dolphin4mi
Copy link

Do you have a 2 vector on the surface and a scalar or a 3 vector in the ambient space and a scalar?

Hi! THANKS for your great job.
I have more questions about how to input features at the first layer at the network. If I have both scaler and vector, 5 scalar features and 4 vector features(tangent 2-vector ) for example(13 feature in total), how could I write the input layer of the network that output 32 features with 2 like this?
self.conv1 = GemResNetBlock(13, 32, 0, 2, **kwargs)

@pimdehaan-qc
Copy link

pimdehaan-qc commented May 9, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants