Supporting scalar tensor broadcasting for AddOp#66
Open
Supporting scalar tensor broadcasting for AddOp#66
Conversation
Integ test
fix include name NNOps to NnOps
1. extend different type tensor for sd, memory 2. inherit super class for polymorphism
Context dev
1. test idea quickly 2. sync idea 3. take type from tensor 4. make type system in ramtensor
1. implement add function 2. implement customized ram tensor constructor
…ensor into featuretensor_refactor
…r into feature_tensor_ref
Feature tensor ref initial merge commit
Add python requirements for SD preparation
Featuretensor refactor
…uTensor into featuretensor_refactor
2. define guard for deep_mnist_mlp for avoid preprocessing non include file 3. modify main function to focus on refactor point
2. modify tensorCast for name lookup
F/context cg ref
f095c05 to
9c7fcb1
Compare
Member
|
Noted, but broadcasting rule should extend to non-scalar cases. |
Member
Author
|
Yes, so just leave it here for now. |
Member
|
@dboyliao Is this still relevant? Or can I close it? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supporting scalar tensor broadcasting.
ex:
tensor1: shape=(50,)
tensor2: shape=(1,)
then broadcasting tensor2 over tensor1 in
AddOp.That is, tensor1+tensor2 will be of shape (50,)
Rationale:
It's common for TensorFlow user to initialize their bias term in NN model as scaler.
So I think it's more consistent with TensorFlow's behavior and the graph pb file it generate if we support at least scalar broadcasting.