more phiflow 3.4 updates for HEAT SIP

This commit is contained in:
N_T 2025-08-12 10:58:56 +02:00
parent 1396482270
commit 45d2b6529e

View File

@ -347,7 +347,7 @@
"def loss_function(net, x_gt: CenteredGrid, sip: bool):\n", "def loss_function(net, x_gt: CenteredGrid, sip: bool):\n",
" y_target = diffuse.fourier(x_gt, 8., 1)\n", " y_target = diffuse.fourier(x_gt, 8., 1)\n",
" with math.precision(32):\n", " with math.precision(32):\n",
" prediction = field.native_call(net, field.to_float(y_target)).vector[0]\n", " prediction = field.native_call(net, field.to_float(y_target))\n",
" prediction += field.mean(x_gt) - field.mean(prediction)\n", " prediction += field.mean(x_gt) - field.mean(prediction)\n",
" x = field.stop_gradient(prediction)\n", " x = field.stop_gradient(prediction)\n",
" if sip:\n", " if sip:\n",