aai-institute / continuiti

Learning function operators with neural networks.
GNU Lesser General Public License v3.0
19 stars 3 forks source link

Shapes Class Attribute in Operators #90

Closed JakobEliasWagner closed 5 months ago

JakobEliasWagner commented 5 months ago

Description

Currently many operators (belnet, deeponet, integralkernel, neuralopreator) define their own class attribute shapes.

Proposed Solution

  1. Move this class attribute to the base class for all operators.

Expected Benefits

Implementation Steps

  1. Define class attribute in base class init.
  2. Pass shapes attribute to super call.
JakobEliasWagner commented 5 months ago

Some operators, like the gradient, do not need to have access to the shapes of the dataset. Therefore, does setting this attribute in Operator not make sense.