python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Parallelizing a for loop with PyTorch Tensor operations
I am loading my training images into a PyTorch dataloader, and I need to calculate the input image's stats. The calculation is taken directly from https://kozodoi.me/python/deep%20learning/pytorch/tut...
disguisedtoast
Votes: 0
Answers: 0
Matlab library code on cluster - not using more than one core/thread?
I am running matlab on a university cluster. The code has no parfor loops but has makes extensive use of vectorized code. So on my local machine when I run the code, the code actually often uses sever...
phdstudent
Votes: 0
Answers: 1
how to retrieve the last value of a cell dynamically while parsing each rows of a dataframe?
I'm trying to store the last value of a cell while I parse my dataframe, I can't know what this value will be so I need a dynamic method to do so.
The desired value is stored in the position [row, 2] ...
Laernyl
Votes: 0
Answers: 1
How to vectorize nested for loops with numpy
I'm trying to stack an image and I can't wrap my head around how to make it more efficient. The following function is correct but not fast enough computationally:
def func(table, arr):
img_sum = n...
Michael Hertzel
Votes: 0
Answers: 1