Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Resize field; Fix Clip and Upscale2D layer #123

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

MaximKuklin
Copy link

  • Add Resize key to AVAILABLE_CONVERTERS as convert_upsample function
  • Add additional Clip logic in case if min and max params are contained in available layers, not in node.attributes
  • Resize params are extracted from node.input[2], not from node.input[1]. By some reason, it didn't work with node.input[2] as it is empty. Looks like in new versions the position of resize params has changed

@@ -28,6 +28,11 @@ def convert_clip(node, params, layers, lambda_func, node_name, keras_name):

input_0 = ensure_tf_type(layers[node.input[0]], name="%s_const" % keras_name)

if 'min' not in params or 'max' not in params:
node_input_data = [layers[attr] for attr in node.input[1:]]
max_attr, min_attr = max(node_input_data), min(node_input_data)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If min only omitted - max will be replaced. Is ts correct behavior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants