Description
The FNO inverse pipeline appears to fail when using InitialConditionInterp with initial_step > 1.
Reproduction
Run the following command:
python models/inverse/train.py +args=config_1DCFD ++args.filename=1D_CFD_Rand_Eta1.e-8_Zeta1.e-8_periodic_Train.hdf5 ++args.model_name=FNO ++args.base_path=../data/ ++args.initial_step=5 ++args.t_train=20 ++args.reduced_resolution=16 ++args.reduced_resolution_t=5 ++args.reduced_batch=200 ++args.batch_size=1 ++args.num_workers=0 ++args.num_channels=3 ++args.inverse_model_type=InitialConditionInterp ++args.inverse_epochs=20 ++args.inverse_learning_rate=0.01 ++args.in_channels_hid=4 ++args.num_samples_max=10 ++args.inverse_verbose_flag=true
Observed behavior
The script fails before the inverse optimization starts with:
UnboundLocalError: local variable 'model' referenced before assignment
After fixing the loader initialization, the same command proceeds further but fails during the FNO forward pass with:
RuntimeError: mat1 and mat2 shapes cannot be multiplied (64x4 and 16x20)
Expected behavior
The inverse pipeline should support FNO checkpoints trained with initial_step > 1 without raising shape mismatch errors.
Additional information
The second error suggests that the inverse reconstruction and the FNO forward model expect different input representations for the initial condition when initial_step > 1.
Description
The FNO inverse pipeline appears to fail when using
InitialConditionInterpwithinitial_step > 1.Reproduction
Run the following command:
Observed behavior
The script fails before the inverse optimization starts with:
After fixing the loader initialization, the same command proceeds further but fails during the FNO forward pass with:
Expected behavior
The inverse pipeline should support FNO checkpoints trained with
initial_step > 1without raising shape mismatch errors.Additional information
The second error suggests that the inverse reconstruction and the FNO forward model expect different input representations for the initial condition when
initial_step > 1.