-
Notifications
You must be signed in to change notification settings - Fork 26
Description
Hi,
I'm just trying to get into tensorflow to be able to modify flowdec to my needs.
There are two things I am trying to achieve:
- do input and output type conversions on the GPU (currently I do this in numpy on the CPU and cProfile shows that the code is spending quite a bit of time on
astype(np.*)). - integrate a windowing/apodization function to reduce artifacts caused by discontinuities at the boundary.
While looking through the flowdec source code to see where I could add these things I noticed the input_prep_fn and output_prep_fn stubs and I am wondering whether I could somehow use these for the above-mentioned purposes.
However, in both cases I somehow need to allocate additional arrays (or "tensors")
- For the input/output dtpye conversion I will have to create additional arrays with the input/output dtypes (typically uint16).
- For the windowing function I would like to pass in a pre-computed windowing function that I multiply with the array.
I notice that inputs and outputs are passed in as dictionaries.
So can I achieve these objectives by initialzing the deconvolution object with some additional key/value pairs in the input/output dictionaries and passing in appropriate input_prep_ and output_prep_ functions or do I need to make modifications to the actual code in flowdec/restoration.py ?
Some guidance with how to approach this would be highly appreciated.