Skip to content

Commit

Permalink
try single slice
Browse files Browse the repository at this point in the history
  • Loading branch information
Emma Ai committed Aug 22, 2024
1 parent 083c1c8 commit 195fff3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docker/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ odc-dscache>=0.2.3
odc-stac @ git+https://github.com/opendatacube/odc-stac@69bdf64

# odc-stac is in PyPI
odc-stats[ows] @ git+https://github.com/opendatacube/odc-stats@b404842
odc-stats[ows] @ git+https://github.com/opendatacube/odc-stats@083c1c8

# For ML
tflite-runtime
Expand Down
9 changes: 5 additions & 4 deletions odc/stats/plugins/lc_treelite_cultivated.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,11 @@ def aggregate_results(input_block, cultivated_value, natural_value):
m_size = input_block.shape[-1]

if m_size > 1:
output_block = ne.evaluate(
"sum(m,axis=2)",
local_dict={"m": output_block},
).astype("float32")
output_block = input_block[..., -1]
# output_block = ne.evaluate(
# "sum(m,axis=2)",
# local_dict={"m": output_block},
# ).astype("float32")

else:
output_block = output_block.squeeze(axis=-1)
Expand Down

0 comments on commit 195fff3

Please sign in to comment.