Update README.md
Browse files30 unmodified lines31323334353630 unmodified lines---## 📝 Model DescriptionPDE-Transformer is a transformer-based foundation model for physics simulations on regular grids.30 unmodified lines3132333435363738394041424344454647484950515253545556575859606162636465666768697030 unmodified lines---### How To Load Pretrained ModelsPDETransformer can be loaded via```pythonimport torchfrom pdetransformer.core.mixed_channels import PDETransformerdevice = torch.device("cuda" if torch.cuda.is_available() else "cpu")# Load fine-tuned model from Hugging Facemodel = PDETransformer.from_pretrained("saipuppala/pde-transformer-mc-s-diffusion-heat").to(device)model.eval()# Example input: batch of size 1, 2 time steps, 64x64 grid# x[..., 0, :, :] ~ u(t0), x[..., 1, :, :] ~ u(t1)x = torch.randn((1, 2, 64, 64), dtype=torch.float32, device=device)with torch.no_grad():out = model(x) # model output (tensor / dict / object)pred_all = out if isinstance(out, torch.Tensor) else (getattr(out, "prediction", None)or getattr(out, "sample", None)or next(v for v in out.values() if isinstance(v, torch.Tensor)))# Convention: channel 1 corresponds to the next state prediction u(t2)u_t2_pred = pred_all[:, 1] # shape: (B, H, W)print(u_t2_pred.shape)```## 📝 Model DescriptionPDE-Transformer is a transformer-based foundation model for physics simulations on regular grids.
README.md+34