Background
Before any weights exist we need something that behaves like the two real models, so that #23 and everything above it can be built and tested on a machine with no GPU. These mocks return numbers of the right shape with no meaning behind them, which is enough to wire the two models together and run the elevation encoding over real arrays.
Description
Create two mock models under the interface from #18, both reachable by name through #19.
The mock core model must:
- take a patch and return two grids
- one is a low resolution elevation grid, the patch size divided by 8
- another is a latent map, a grid with multiple channels
- must be deterministic
The mock decoder must:
- take a latent map and return a full resolution grid the same size as the patch the core model was given
- must be deterministic
The shapes from the paper are:
patch 512 x 512
low res grid 64 x 64
detail grid 512 x 512
latent map not yet known
The latent map shape is not written down anywhere yet, so pick a placeholder. Keep the patch size and the latent map shape as named constants in one place so they can be swapped for the real values later without hunting through the code.
Changes should live in src/terrain_diffusion/inference.py and tests/test_inference.py
Testing:
- Assert the core model returns two grids
- Assert the low res grid is the patch size divided by 8
- Assert the latent map has more than one channel
- Assert the decoder output is the same size as the patch given to the core model
- Assert running either model twice on the same input gives the same output
Background
Before any weights exist we need something that behaves like the two real models, so that #23 and everything above it can be built and tested on a machine with no GPU. These mocks return numbers of the right shape with no meaning behind them, which is enough to wire the two models together and run the elevation encoding over real arrays.
Description
Create two mock models under the interface from #18, both reachable by name through #19.
The mock core model must:
The mock decoder must:
The shapes from the paper are:
The latent map shape is not written down anywhere yet, so pick a placeholder. Keep the patch size and the latent map shape as named constants in one place so they can be swapped for the real values later without hunting through the code.
Changes should live in
src/terrain_diffusion/inference.pyandtests/test_inference.pyTesting: