Recent comments in /f/deeplearning

trajo123 t1_jdhi7u8 wrote

Reply to comment by Rishh3112 in Cuda out of memory error by Rishh3112

The problem is likely in your training loop. Perhaps your computation graphs keeps going because you keep track of the average loss as an autograd variable rather than a plain numerical one. Make sure that for any metrics/logging you use loss.item().

5

Rishh3112 OP t1_jdhd785 wrote

Reply to comment by humpeldumpel in Cuda out of memory error by Rishh3112

class CNN(nn.Module):
def __init__(self, num_chars):
super(CNN, self).__init__()
# Convolution Layer
self.conv1 = nn.Conv2d(3, 128, kernel_size=(3, 6), padding=(1, 1))
self.pool1 = nn.MaxPool2d(kernel_size=(2, 2))
self.conv2 = nn.Conv2d(128, 64, kernel_size=(3, 6), padding=(1, 1))
self.pool2 = nn.MaxPool2d(kernel_size=(2, 2))
# Dense Layer
self.fc1 = nn.Linear(768, 64)
self.dp1 = nn.Dropout(0.2)
# Recurrent Layer
self.lstm = nn.GRU(64, 32, bidirectional=True)
# Output Layer
self.output = nn.Linear(64, num_chars + 1)
def forward(self, images, targets=None):
bs, _, _, _ = images.size()
x = F.relu(self.conv1(images))
x = self.pool1(x)
x = F.relu(self.conv2(x))
x = self.pool2(x)
x = x.permute(0, 3, 1, 2)
x = x.view(bs, x.size(1), -1)
x = F.relu(self.fc1(x))
x = self.dp1(x)
x, _ = self.lstm(x)
x = self.output(x)
x = x.permute(1, 0, 2)
if targets is not None:
log_probs = F.log_softmax(x, 2)
input_lengths = torch.full(
size=(bs,), fill_value=log_probs.size(0), dtype=torch.int32
)
target_lengths = torch.full(
size=(bs,), fill_value=targets.size(1), dtype=torch.int32
)
loss = nn.CTCLoss(blank=0)(
log_probs, targets, input_lengths, target_lengths
)
return x, loss
return x, None
if __name__ == '__main__':
model = CNN(74)
img = torch.rand(config.BATCH_SIZE, 3, 50, 200)
target = torch.randint(1, 20, (config.BATCH_SIZE, 5))
x, loss = model(img, target)
print(loss)

0

fhadley t1_jdeun1p wrote

Yeah I mean it's obviously an overreaction right? And a concerningly intrusive one at that- surely they could've have checked telemetry and verified at least authentic-seemimg behavior on your part. But beyond the knee jerk reaction which can be reasonable chalked up to poor governance at a startup, so, fine, it's like how'd they end up with stockfish on an undocumented dependencies blacklist? I've thought too much about this already lol. Glad you got your access restored though

2

FermatsLastAccount OP t1_jdeg989 wrote

I'll probably stay with them since it's for personal use and they're the best value I've seen, but it's definitely sketchy.

It wouldn't have been as bad if they had just warned me that Stockfish isn't allowed and then taken action if I didn't respond. Instead of first deactivating my account and then responding after I emailed them.

1

geoffroy_lesage OP t1_jde7chs wrote

Fair enough, no there is no deep user interaction with the app it’s just a normal marketplace app, think Amazon app. I’ve just been relying on a bunch of research papers that seem to suggest that each of those data points individually yield unique profiles with high accuracy but I may be misunderstanding them… just a few:

- https://www.sciencedirect.com/science/article/pii/S1877050921015532

- https://www.sciencedirect.com/science/article/pii/S1877050918314996

- https://citeseerx.ist.psu.edu/viewdoc/download;jsessionid=67C08602F99414F622E55151E2EC484C?doi=10.1.1.675.9557&rep=rep1&type=pdf

1

the_Wallie t1_jdd0t7w wrote

I don't think thst it's self-evident that all of those individual behaviors can actually yield a truly unique behavioral pattern per user for each type of app. Maybe when combined, if your app involves a lot of deep user interaction, but since you haven't shared what your app is supposed to actually do, it's impossible to give an informed opinion on your probability of success a priori, so all I can say is I'm skeptical but I wish you good luck building a solution.

1

geoffroy_lesage OP t1_jdc1x8t wrote

I see, ok. This is encouraging to be honest, I knew there wasn't just going to be a magical solution that is easy to see but I think there is some research needed in this department. This is something that could be huge, and maybe it's not ML but just logic gates chained together.
You said any Neural Net would do? Any particular one you would recommend for testing?

1

Jaffa6 t1_jdc1gz4 wrote

It's possible, but I think you'd struggle to improve it (though I freely admit that I don't know enough maths to say). But yeah, it's never going to be a reliable method at all.

To be honest, I'd expect you to have more problems with people not being able to sign in as themselves (inconsistent behaviour) than signing in as other people deliberately.

1

geoffroy_lesage OP t1_jdc027t wrote

I see, understood. You think harsh because it would be unreliable essentially? If it's possible is there no way of improving it or it will always be unreliable due to the nature of this method?

Right, I've been thinking about this for a bit and I'm not dead set on doing it like this but it seemed like there was a way so I wanted to explore. Unfortunately I'm not as smart as all you guys and gals but figured I'd ask for opinions.

2