Questions tagged [pytorch]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
33 views

Loops in PyTorch Implementation

I'm trying to implement a regularization term for the loss function of a neural network. ...
4
votes
2answers
322 views

PyTorch Vectorized Implementation for Thresholding and Computing Jaccard Index

I have been trying to optimize a code snippet which finds the optimal threshold value in a n_patch * 256 * 256 probability map to get the highest Jaccard index ...
2
votes
0answers
58 views

GRU-Autoencoder training

I'm training a GRU auto-encoder and my current code is very slow.I believe it's predict_captions function that takes most the time. Any suggestion to optimize this code? ...
4
votes
1answer
144 views

PyTorch Unit-testing in Python

I'm new to PyTorch and I'm writing a unit test for an activation function I'm making. I plan to test against a reference implementation for this function. I want to approach this in a test-driven way,...
1
vote
0answers
18 views

Splitting torch tensor by flags

Working with PyTorch tensors, I need to split the batch of items by its flags, so the items in x_batch_one and x_batch_two are ...
1
vote
0answers
82 views

Posterior collapses in an RNN variational auto-encoder - PyTorch

I am trying to implement and train an RNN variational auto-encoder as the one explained in "Generating Sentences from a Continuous Space". Although I apply their proposed techniques to mitigate ...
18
votes
2answers
4k views

Intersection over Union for rotated rectangles

Problem Statement I am trying to find the intersection over union (IoU) metric for one to several rotated rectangles compared to many different rotated rectangles. Here are some images to help ...