Thank you for providing the code for the experiments!
I'm trying to run the models on the Burgers' equation, but I get errors on the PyTorch and TF sides.
For example, when running FNO with PyTorch, something is wrong with Adam:
Traceback (most recent call last):
File ".../deeponet-fno/src/burgers/fourier_1d.py", line 322, in <module>
FNO_main(training_data_resolution, save_index)
File ".../deeponet-fno/src/burgers/fourier_1d.py", line 225, in FNO_main
optimizer.step()
File ".../miniconda3/envs/fair-torch/lib/python3.11/site-packages/torch/optim/lr_scheduler.py", line 69, in wrapper
return wrapped(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File ".../miniconda3/envs/fair-torch/lib/python3.11/site-packages/torch/optim/optimizer.py", line 280, in wrapper
out = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File ".../miniconda3/envs/fair-torch/lib/python3.11/site-packages/torch/optim/optimizer.py", line 33, in _use_grad
ret = func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../miniconda3/envs/fair-torch/lib/python3.11/site-packages/torch/optim/adam.py", line 141, in step
adam(
File ".../miniconda3/envs/fair-torch/lib/python3.11/site-packages/torch/optim/adam.py", line 281, in adam
func(params,
File ".../miniconda3/envs/fair-torch/lib/python3.11/site-packages/torch/optim/adam.py", line 442, in _multi_tensor_adam
device_grads = torch._foreach_add(device_grads, device_params, alpha=weight_decay)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: The size of tensor a (2) must match the size of tensor b (16) at non-singleton dimension 3
And when trying to run DeepONet-POD with TF, there is an error complaining about tf.Saver:
Traceback (most recent call last):
File ".../deeponet-fno/src/burgers/deeponet_POD.py", line 131, in <module>
main()
File ".../deeponet-fno/src/burgers/deeponet_POD.py", line 122, in main
model.compile(
File ".../miniconda3/envs/fair-tf/lib/python3.9/site-packages/deepxde/utils/internal.py", line 22, in wrapper
result = f(*args, **kwargs)
File ".../miniconda3/envs/fair-tf/lib/python3.9/site-packages/deepxde/model.py", line 131, in compile
self._compile_tensorflow_compat_v1(lr, loss_fn, decay, loss_weights)
File ".../miniconda3/envs/fair-tf/lib/python3.9/site-packages/deepxde/model.py", line 158, in _compile_tensorflow_compat_v1
self.saver = tf.train.Saver(max_to_keep=None)
File ".../miniconda3/envs/fair-tf/lib/python3.9/site-packages/tensorflow/python/training/saver.py", line 934, in __init__
self.build()
File ".../miniconda3/envs/fair-tf/lib/python3.9/site-packages/tensorflow/python/training/saver.py", line 946, in build
self._build(self._filename, build_save=True, build_restore=True)
File ".../miniconda3/envs/fair-tf/lib/python3.9/site-packages/tensorflow/python/training/saver.py", line 971, in _build
raise ValueError("No variables to save")
ValueError: No variables to save
I believe it happens because of some updates in the frameworks. So could you please provide the exact versions of the packages you used to run the experiments?
Hi Prof. Lu,
Thank you for providing the code for the experiments!
I'm trying to run the models on the Burgers' equation, but I get errors on the PyTorch and TF sides.
For example, when running FNO with PyTorch, something is wrong with Adam:
And when trying to run DeepONet-POD with TF, there is an error complaining about tf.Saver:
I believe it happens because of some updates in the frameworks. So could you please provide the exact versions of the packages you used to run the experiments?
Thank you!
Best, Iryna