apple / apple/coremltools

CoreML maps tensorflow's pad op's symmetric mode to reflect mode.

Open
#2,280 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
5.4k
Forks
850
Avg merge
4d 5h
Merged PRs (30d)
10

Description

See here https://github.com/apple/coremltools/blob/0e292a072452db19d1e64b687a372c0c54704a90/coremltools/converters/mil/frontend/tensorflow/ops.py#L1897

The `pad` symmetric mode is mapped to reflect mode, but according to [tensorflow documentation](https://www.tensorflow.org/api_docs/python/tf/pad) the behavior is different - symmetric mode includes the edge values.
So it should report as an error that `symmetric` mode is not supported by CoreML?

Contributor guide

Open the contributing guide

Research direction

Start at coremltools/converters/mil/frontend/tensorflow/ops.py around line 1897 and read the linked TensorFlow pad documentation to compare symmetric and reflect semantics. Trace the surrounding mode handling and confirm the finished behavior reports symmetric as unsupported rather than silently mapping it to reflect.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, tensorflow
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.