-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
97 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: DummyTFModel | ||
description: A dummy tensorflow model for testing | ||
authors: | ||
- ilastik team | ||
cite: | ||
- text: "Ilastik" | ||
doi: https://doi.org | ||
documentation: dummy.md | ||
tags: [tensorflow] | ||
license: MIT | ||
|
||
format_version: 0.1.0 | ||
language: python | ||
framework: tensorflow | ||
|
||
source: dummy.py::TensorflowModelWrapper | ||
|
||
test_input: null # ../test_input.npy | ||
test_output: null # ../test_output.npy | ||
|
||
# TODO double check inputs/outputs | ||
inputs: | ||
- name: input | ||
axes: bcyx | ||
data_type: float32 | ||
data_range: [-inf, inf] | ||
shape: [1, 1, 128, 128] | ||
outputs: | ||
- name: output | ||
axes: bcyx | ||
data_type: float32 | ||
data_range: [0, 1] | ||
shape: | ||
reference_input: input # FIXME(m-novikov) ignoring for now | ||
scale: [1, 1, 1, 1] | ||
offset: [0, 0, 0, 0] | ||
#halo: [0, 0, 32, 32] # Should be moved to outputs | ||
|
||
prediction: | ||
weights: | ||
source: ./model | ||
hash: {md5: TODO} | ||
dependencies: conda:./environment.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
class TensorflowModelWrapper: | ||
def __init__(self): | ||
self._model = None | ||
|
||
def set_model(self, model): | ||
self._model = model | ||
|
||
def forward(self, input_): | ||
return self._model.predict(input_) | ||
|
||
def __call__(self, *args, **kwargs): | ||
return self._model.predict(*args, **kwargs) |
Binary file not shown.
Binary file added
BIN
+1.22 KB
tests/data/dummy_tensorflow/model/variables/variables.data-00000-of-00001
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters