Simplify models #506
dario-coscia
started this conversation in
General
Replies: 2 comments 1 reply
-
Hi, agree in removing the checks if they blocks some options that are in practice feasible and they may also improve the overall performance of the models |
Beta Was this translation helpful? Give feedback.
0 replies
-
@ndem0 @GiovanniCanali what do you think? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! I open a discussion here for simplifying the model structure. Now for compositional models (i.e. models that are composed or stacked together), we perform many checks on the shapes by creating fictitious inputs. Examples of these models are DeepONet, FNO, LowRankNeuralOperator, MIONET, ....
Here is an example of what we do with FNO:
PINA/pina/model/fno.py
Line 235 in f0bff24
I think that this approach has a significant advantage: we can control the type of passed input. In version 0.1 where we only allowed for LabelTensor, this is what we needed to do to allow LabelTensor to work correctly. However, with the 0.2, this type of checking is limiting the usage. For example, in FNO let's suppose I work with a costume network as follows:
this triggers the error but it is completely valid (I have been there, done that already 🙁).
I suggest removing the network shape checks in compositional models such to leave more freedom to the users to use them. What do you think?
Beta Was this translation helpful? Give feedback.
All reactions