Recent comments in /f/deeplearning
CKtalon t1_jdhkdgc wrote
Reply to Cuda out of memory error by Rishh3112
Code seems fine unless your batch size is too huge. Try running on CPU and see how much RAM is used and debug from there?
Rishh3112 OP t1_jdhiguj wrote
Reply to comment by trajo123 in Cuda out of memory error by Rishh3112
i just checked in my training loop I'm using loss.item()
Rishh3112 OP t1_jdhib79 wrote
Reply to comment by trajo123 in Cuda out of memory error by Rishh3112
sure ill will give it a try thanks a lot.
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().
Rishh3112 OP t1_jdhi3xo wrote
Reply to comment by trajo123 in Cuda out of memory error by Rishh3112
i actually did. But the suggestions it gave was for general out of memory. Didnt help a lot.
trajo123 t1_jdhhteo wrote
Reply to Cuda out of memory error by Rishh3112
Have you tried asking ChatGPT? :)
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)
humpeldumpel t1_jdhcgg6 wrote
Reply to comment by Rishh3112 in Cuda out of memory error by Rishh3112
Well then it's the memory issue. Hard to say without seeing your code
Rishh3112 OP t1_jdhbz4o wrote
Reply to comment by Old-Chemistry-7050 in Cuda out of memory error by Rishh3112
The model isn't too big. There should not be a problem with that.
Old-Chemistry-7050 t1_jdhbvrc wrote
Reply to Cuda out of memory error by Rishh3112
Model too big or there’s a memory issue somewhere in ur code
fhadley t1_jdeun1p wrote
Reply to comment by FermatsLastAccount in Anyone have any good alternatives to Paperspace? My account got closed for unauthorized access. by FermatsLastAccount
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
FermatsLastAccount OP t1_jdeg989 wrote
Reply to comment by fhadley in Anyone have any good alternatives to Paperspace? My account got closed for unauthorized access. by FermatsLastAccount
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.
geoffroy_lesage OP t1_jde7chs wrote
Reply to comment by the_Wallie in Question for use of ML in adaptive authentication by geoffroy_lesage
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
fhadley t1_jddnbx3 wrote
Reply to comment by FermatsLastAccount in Anyone have any good alternatives to Paperspace? My account got closed for unauthorized access. by FermatsLastAccount
Super duper sketchy. I have a pre-existing call w their sales folks tm (we're evaluating internally at the startup where I work), debating bringing this up
FermatsLastAccount OP t1_jddmtqn wrote
Reply to comment by fhadley in Anyone have any good alternatives to Paperspace? My account got closed for unauthorized access. by FermatsLastAccount
In case you wanted an update, I asked them yesterday how I was supposed to know Stockfish would get me banned and what other Python modules would get my account suspended. They just responded saying they whitelisted and reactivated my account.
the_Wallie t1_jdd0t7w wrote
Reply to comment by geoffroy_lesage in Question for use of ML in adaptive authentication by geoffroy_lesage
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.
FermatsLastAccount OP t1_jdcz22w wrote
Reply to comment by fhadley in Anyone have any good alternatives to Paperspace? My account got closed for unauthorized access. by FermatsLastAccount
I haven't, all I did was post here and on /r/learnmachinelearning. I realized my account was suspended the day before yesterday and emailed them asking about what was wrong.
fhadley t1_jdcwet0 wrote
Reply to comment by FermatsLastAccount in Anyone have any good alternatives to Paperspace? My account got closed for unauthorized access. by FermatsLastAccount
Wait... forreal though? Have you tried to make a fuss out of it? This seems like the kind of outcome they'd want to avoid.
FermatsLastAccount OP t1_jdcu3ay wrote
Reply to comment by fhadley in Anyone have any good alternatives to Paperspace? My account got closed for unauthorized access. by FermatsLastAccount
No idea. I had no idea it was banned until I suddenly couldn't log in and emailed them asking what the issue was.
geoffroy_lesage OP t1_jdc27dn wrote
Reply to comment by Jaffa6 in Question for use of ML in adaptive authentication by geoffroy_lesage
cool thanks!
Jaffa6 t1_jdc264k wrote
Reply to comment by geoffroy_lesage in Question for use of ML in adaptive authentication by geoffroy_lesage
For testing as a proof of concept, you could probably just use a shallow feedforward network. I don't think you need any complex or deep architecture here.
geoffroy_lesage OP t1_jdc1x8t wrote
Reply to comment by Jaffa6 in Question for use of ML in adaptive authentication by geoffroy_lesage
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?
Jaffa6 t1_jdc1gz4 wrote
Reply to comment by geoffroy_lesage in Question for use of ML in adaptive authentication by geoffroy_lesage
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.
geoffroy_lesage OP t1_jdc027t wrote
Reply to comment by Jaffa6 in Question for use of ML in adaptive authentication by geoffroy_lesage
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.
Rishh3112 OP t1_jdhks1w wrote
Reply to comment by CKtalon in Cuda out of memory error by Rishh3112
my batch size is just 8. I am running it on CPU and my laptop has 8gb of ram and its running fine there.