Support for MirrorPad
We were trying to convert a Magenta -> TF Hub module -> tfjs.
Hi @pyu10055 any plans to support MirrorPad ?
@rthadur @pyu10055 How to replace MirrorPad in the generated model with other pad
Any progress on this issue? We have a model for image processing, MirrorPad handles the borders pretty good so we can't replace it with other pads or work arounds easily as #936.
Or any guide we can add a custom op to tensorflowjs? I'd like to give it a try if tensorflowjs has such mechanisms. Thanks!
@pyu10055 gentle ping , CC @kangyizhang
tensorflowjs MirrorPad https://github.com/qzcsgs/tfjs-MirrorPad
@vbardiovskyg if this is still an issues, I successfully converted the Magenta model from tf.hub into tf-js:
1. Convert the model checkpoint to tfjs:
tensorflowjs_converter --control_flow_v2=True --input_format=tf_hub --skip_op_check --strip_debug_ops=True --signature_name serving_default https://tfhub.dev/google/magenta/arbitrary-image-stylization-v1-256/2 ./models/magenta_tfjs
2. Copy-paste this snippet into your .js or .html (within ): https://github.com/gkcalat/mirrorpad-tfjs/blob/master/mirrorpad.js
UPDATE: a proper MirrorPad implementation seems to be merged in #3951