Skip to content

Commit

Permalink
🔀 Merge branch 'model/with_arthern2006accumulation' (#151)
Browse files Browse the repository at this point in the history
Closes #151 Train and tune ESRGAN with Antarctic Snow Accumulation input.
  • Loading branch information
weiji14 committed Jun 18, 2019
2 parents 3e2c512 + e8ae274 commit baa12ce
Show file tree
Hide file tree
Showing 8 changed files with 4,208 additions and 3,080 deletions.
1,108 changes: 573 additions & 535 deletions deepbedmap.ipynb

Large diffs are not rendered by default.

397 changes: 235 additions & 162 deletions deepbedmap.py

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions features/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def _quick_download_lowres_misc_datasets():
"misc/REMA_100m_dem",
"misc/REMA_200m_dem_filled",
"misc/MEaSUREs_IceFlowSpeed_450m",
"misc/Arthern_accumulation_bedmap2_grid1",
]:

if not os.path.exists(path=f"{geotiff}.tif"):
Expand Down
6 changes: 3 additions & 3 deletions features/steps/test_deepbedmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ def get_model_input_raster_images(context):
):
quilt.install(package="weiji14/deepbedmap/model/test", force=True)
pkg = quilt.load(pkginfo="weiji14/deepbedmap/model/test")
input_tiles = pkg.X_tile(), pkg.W1_tile(), pkg.W2_tile()
input_tiles = pkg.X_tile(), pkg.W1_tile(), pkg.W2_tile(), pkg.W3_tile()
else:
input_tiles = context.deepbedmap.get_deepbedmap_model_inputs(
window_bound=context.window_bound
)
context.X_tile, context.W1_tile, context.W2_tile = input_tiles
context.X_tile, context.W1_tile, context.W2_tile, context.W3_tile = input_tiles


@when("pass those images into our trained neural network model")
def predict_using_trained_neural_network(context):
model = context.deepbedmap.load_trained_model()
context.Y_hat = model.forward(
x=context.X_tile, w1=context.W1_tile, w2=context.W2_tile
x=context.X_tile, w1=context.W1_tile, w2=context.W2_tile, w3=context.W3_tile
).array


Expand Down
Loading

0 comments on commit baa12ce

Please sign in to comment.