Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

Questions tagged [tensor]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
7 views

Help With Converting NumPy Function To TensorFlow Ops (graph execution issue)

I'm trying to export my command recognition model for deploymenet on embedded devices, however, I'm facing trouble when trying to encapsulate the preprocessing function into my model, that way, when I ...
Aamar_Alberm3768's user avatar
0 votes
0 answers
21 views

Implement tensor operation with mini batches instead of Matrix multiplication in forward pass

The forward pass in neural network can be written as g(Wx+b). W is the weights Matrix, x is the input vector and b is bias, and g the non linearity, the activation function. However x can have more ...
CoffeDeveloper's user avatar
3 votes
1 answer
76 views

Are the Dot Product and Tensor Product the same thing in Machine Learning?

I'm currently reading "Deep Learning with Python, Second Edition" by François Chollet, and I need help understanding one thing. Below paragraph was copied from the page 41 2.2.3 Tensor ...
Kamil Bęben's user avatar
1 vote
1 answer
857 views

What operation is ggml_mul_mat performing? (K×Q in LLaMA)

I’m reading the source code of alpaca.cpp in an attempt to understand how a large language model works. (I have a strong programming background, but almost no math, ...
Wolfgang's user avatar
  • 111
2 votes
1 answer
581 views

How to calculate a meaningful distance between multidimensional tensors

TLDR: given two tensors $t_1$ and $t_2$, both with shape $(c,h,w),$ how shall the distance between them be measured? More Info: I'm working on a project in which I'm trying to distinguish between an ...
Hadar Sharvit's user avatar
0 votes
1 answer
83 views

What does it mean by "lazy mean" here?

Consider the following paragraph, taken from 3.4: Named Tensors of the textbook named Deep Learning with PyTorch by Eli Stevens et al., regarding the calculation of the mean for RGB channels of an RGB ...
hanugm's user avatar
  • 3,880
1 vote
1 answer
800 views

Not able to understand Pytorch Tensor (Weight & Biases) Size for Linear Regression

Below are the two tensors ...
ZKS's user avatar
  • 121
0 votes
1 answer
1k views

What is the definition of a trace of a tensor?

Tensor is a multi-dimensional ordered collection of elements, which is used in deep learning to store and process data as well as intermediate steps. We are aware of the trace of a two-dimensional ...
hanugm's user avatar
  • 3,880
2 votes
0 answers
19 views

Do any practical deep learning algorithms deal with tensors containing non-real entries?

In deep learning, most of the applications are from text and images. Both text and images can be converted into a tensor of real numbers. Other than both mentioned above, there may be some other real-...
hanugm's user avatar
  • 3,880
0 votes
1 answer
317 views

Why using negative integers (as dimensions?) in tensor shapes rather than natural numbers?

Consider the following paragraph from A.1 MULTI-MNIST AND CLEVR of A IMPLEMENTATION DETAILS from the research paper titled ...
hanugm's user avatar
  • 3,880
0 votes
0 answers
37 views

Cost functions for reducing Tensors to 1-dimensional arrays?

I'm interested in the IT side, here, specifically how I most efficiently store a tensor in a one dimensional data structure. My assumption is that certain approaches will be more expensive than others,...
DukeZhou's user avatar
  • 6,237
0 votes
2 answers
51 views

How to visually or intuitively understand single element multi-dimensional tensors?

Consider the following code in PyTorch ...
hanugm's user avatar
  • 3,880
1 vote
0 answers
93 views

Which product operation should be used in affine transformation?

Affine transformation as I am aware can be expressed as either dot product followed by addition or a matrix multiplication followed by addition $$a.x+b$$ $$a^{T}x + b$$ where the first one is based on ...
hanugm's user avatar
  • 3,880
0 votes
1 answer
105 views

What are the (key) purposes of unsqueezing operation on tensors?

The unsqeeze operation is used in several deep learning algorithms. However, I only found this operation in the code/implementation of the algorithms presented in the papers, which do not mention it. ...
hanugm's user avatar
  • 3,880
2 votes
1 answer
120 views

Do researchers generally treat tensors just as mathematical objects with certain shape?

Most of the practical research in AI that includes neural networks deals with higher dimensional tensors. It is easy to imagine tensors up to three dimensions. When I ask the question How do ...
hanugm's user avatar
  • 3,880
0 votes
2 answers
1k views

What is meant by an axis of a tensor?

Tensor is an ordered collection of elements. The elements are generally real numbers. Tensors are used in deep learning for storing data. There is a wide usage of the word "axis" related to ...
hanugm's user avatar
  • 3,880