Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Make reify check for existing names in the current TensorFlow graph #90

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

Merged

Conversation

brandonwillard
Copy link
Contributor

Now, when we reify TensorFlow meta objects, we check the current graph for any Operations with the same name as the meta Operation being reified. If there is such an Operation in the graph, we make sure it's equivalent to the meta Operation and return it if it is; otherwise, we throw a new MetaReificationError.

Also, this PR introduces a work-around for direct construction of constant tensors (e.g. mt.const(1, 'int32', 'Const')). Previously, this was causing errors because the first argument (i.e. the value parameter) wasn't a TensorProto type. We could simply carry around TensorProto typed values in the meta NodeDef, but that would cause other problems, so—instead—a wrapped version of the tf.raw_ops.Const function was added; it takes care of the conversion to TensorProto.

@brandonwillard brandonwillard added bug Something isn't working enhancement New feature or request important Features and issues that need to be addressed ASAP labels Nov 5, 2019
@brandonwillard brandonwillard self-assigned this Nov 5, 2019
@brandonwillard brandonwillard changed the title Reify check names in tf graph Make reify check for existing names in the current TensorFlow graph Nov 5, 2019
@brandonwillard brandonwillard merged commit 7656442 into pymc-devs:master Nov 5, 2019
@brandonwillard brandonwillard deleted the reify-check-names-in-tf-graph branch November 5, 2019 05:01
@brandonwillard brandonwillard added meta graph This issue involves the meta graph objects TensorFlow This issue involves the TensorFlow backend labels Mar 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request important Features and issues that need to be addressed ASAP meta graph This issue involves the meta graph objects TensorFlow This issue involves the TensorFlow backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant