Tensor Operation in Tensorflow2019 Community Moderator ElectionStuck on deconvolution in Theano and TensorFlowTensorflow neural network TypeError: Fetch argument has invalid typeUnable to perform Keras Reshape to an input to match convolution outputTensor Decomposition in TensorFlow for multinomial time series dimensionality reductionHow to use Embedding() with 3D tensor in Keras?How to sort tensor along two axis by variance in TensorFlow?Dynamic rnn for toysequence classificationAccessing and Multiplying Individual Elements of a Layer's Output in KerasLoss function returns nan on time series dataset using tensorflowComparing tensors in TensorFlow

Is there a hemisphere-neutral way of specifying a season?

Why would the Red Woman birth a shadow if she worshipped the Lord of the Light?

Why do I get negative height?

One verb to replace 'be a member of' a club

Is it inappropriate for a student to attend their mentor's dissertation defense?

How can a day be exactly 24 hours long?

How would I stat a creature to be immune to everything but the Magic Missile spell? (just for fun)

Processor speed limited at 0.4 GHz

How dangerous is XSS

Placement of More Information/Help Icon button for Radio Buttons

What is the opposite of "eschatology"?

Why is it a bad idea to hire a hitman to eliminate most corrupt politicians?

How could indestructible materials be used in power generation?

GFCI outlets - can they be repaired? Are they really needed at the end of a circuit?

How to compactly explain secondary and tertiary characters without resorting to stereotypes?

What reasons are there for a Capitalist to oppose a 100% inheritance tax?

How do I gain back my faith in my PhD degree?

Should I tell management that I intend to leave due to bad software development practices?

Simple macro for new # symbol

In Bayesian inference, why are some terms dropped from the posterior predictive?

Different meanings of こわい

How to properly check if the given string is empty in a POSIX shell script?

Alternative to sending password over mail?

How to stretch the corners of this image so that it looks like a perfect rectangle?



Tensor Operation in Tensorflow



2019 Community Moderator ElectionStuck on deconvolution in Theano and TensorFlowTensorflow neural network TypeError: Fetch argument has invalid typeUnable to perform Keras Reshape to an input to match convolution outputTensor Decomposition in TensorFlow for multinomial time series dimensionality reductionHow to use Embedding() with 3D tensor in Keras?How to sort tensor along two axis by variance in TensorFlow?Dynamic rnn for toysequence classificationAccessing and Multiplying Individual Elements of a Layer's Output in KerasLoss function returns nan on time series dataset using tensorflowComparing tensors in TensorFlow










0












$begingroup$


enter image description here



I have 2 tensors tensor A and tensor B as shown in the image.
I want to take each 1x16 vector from tensor B and perform a dot product with the correcponding batch (axis 0 is the batch dimension in each tensor) of tensor A along axis 1 and 2 of A.
The expected output shape should be (3,2,28,28).
How can I do this in tensorflow. I tried einsum but am confused.Any help with code will be greatly appreciated.
Thanks










share|improve this question









$endgroup$







  • 1




    $begingroup$
    The question should be posted on StackOverflow.
    $endgroup$
    – Shubham Panchal
    Mar 28 at 8:13















0












$begingroup$


enter image description here



I have 2 tensors tensor A and tensor B as shown in the image.
I want to take each 1x16 vector from tensor B and perform a dot product with the correcponding batch (axis 0 is the batch dimension in each tensor) of tensor A along axis 1 and 2 of A.
The expected output shape should be (3,2,28,28).
How can I do this in tensorflow. I tried einsum but am confused.Any help with code will be greatly appreciated.
Thanks










share|improve this question









$endgroup$







  • 1




    $begingroup$
    The question should be posted on StackOverflow.
    $endgroup$
    – Shubham Panchal
    Mar 28 at 8:13













0












0








0





$begingroup$


enter image description here



I have 2 tensors tensor A and tensor B as shown in the image.
I want to take each 1x16 vector from tensor B and perform a dot product with the correcponding batch (axis 0 is the batch dimension in each tensor) of tensor A along axis 1 and 2 of A.
The expected output shape should be (3,2,28,28).
How can I do this in tensorflow. I tried einsum but am confused.Any help with code will be greatly appreciated.
Thanks










share|improve this question









$endgroup$




enter image description here



I have 2 tensors tensor A and tensor B as shown in the image.
I want to take each 1x16 vector from tensor B and perform a dot product with the correcponding batch (axis 0 is the batch dimension in each tensor) of tensor A along axis 1 and 2 of A.
The expected output shape should be (3,2,28,28).
How can I do this in tensorflow. I tried einsum but am confused.Any help with code will be greatly appreciated.
Thanks







machine-learning tensorflow






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 28 at 7:18









Abhisek DashAbhisek Dash

666




666







  • 1




    $begingroup$
    The question should be posted on StackOverflow.
    $endgroup$
    – Shubham Panchal
    Mar 28 at 8:13












  • 1




    $begingroup$
    The question should be posted on StackOverflow.
    $endgroup$
    – Shubham Panchal
    Mar 28 at 8:13







1




1




$begingroup$
The question should be posted on StackOverflow.
$endgroup$
– Shubham Panchal
Mar 28 at 8:13




$begingroup$
The question should be posted on StackOverflow.
$endgroup$
– Shubham Panchal
Mar 28 at 8:13










0






active

oldest

votes












Your Answer





StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "557"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f48128%2ftensor-operation-in-tensorflow%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Data Science Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f48128%2ftensor-operation-in-tensorflow%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Adding axes to figuresAdding axes labels to LaTeX figuresLaTeX equivalent of ConTeXt buffersRotate a node but not its content: the case of the ellipse decorationHow to define the default vertical distance between nodes?TikZ scaling graphic and adjust node position and keep font sizeNumerical conditional within tikz keys?adding axes to shapesAlign axes across subfiguresAdding figures with a certain orderLine up nested tikz enviroments or how to get rid of themAdding axes labels to LaTeX figures

Tähtien Talli Jäsenet | Lähteet | NavigointivalikkoSuomen Hippos – Tähtien Talli

Do these cracks on my tires look bad? The Next CEO of Stack OverflowDry rot tire should I replace?Having to replace tiresFishtailed so easily? Bad tires? ABS?Filling the tires with something other than air, to avoid puncture hassles?Used Michelin tires safe to install?Do these tyre cracks necessitate replacement?Rumbling noise: tires or mechanicalIs it possible to fix noisy feathered tires?Are bad winter tires still better than summer tires in winter?Torque converter failure - Related to replacing only 2 tires?Why use snow tires on all 4 wheels on 2-wheel-drive cars?