« first day (4989 days earlier)      last day (174 days later) » 

00:59
@Marco I don't do ML, and I only just read about SSIM. en.wikipedia.org/wiki/Structural_similarity_index_measure So feel free to ignore my advice. ;) I suggest you just try filter_size=8 and see if that gives you useful results. Do not adjust the other parameters.
However, Gaussian convolution kernels usually have an odd size, so you may get better results with a 7×7 or 5×5 filter. OTOH, the SSIM is trying to do a statistical comparison between a pair of images, and you are giving it pretty small images, so the results may not be very useful.
Another option is to simply double the size of your images, and use the default 11×11 filter. But maybe the SSIM will be affected by the resulting pixelization.
 
1 hour later…
02:35
@PM2Ring Hi. Ok, it works with filter_size = 8, I just don't know if it's right.
@PM2Ring Hmm, right. I tested smaller and odd sizes, the results are better...
@PM2Ring I think it's not viable in my case.
Thank you very much for your help!
 
6 hours later…
08:57
From the dupe of this question I've come to learn about np.flatiter but I can't get my head around the use case. Firstly, I don't see why you need 1000 repetitions of the same array as though it were 2D and second, I don't know why you wouldn't floor divide your indices to work out the location in a 2D grid. Is that what np is doing in stride_tricks? The link in the docs points to the wrong code place too :/
I'm also seemingly being dumb because I can't even find where the code is to create it. Lots of references to it but not the actual code to tell me how it works :/
 
3 hours later…
12:25
Yam, just tracked down a case of our-backend-dies-if-the-user-sneezes to undefined behaviour in C code. :/
I have no idea how our software world is still up and running with such a minefield factory...
And to promote my current attitude towards SO: Kudos to the three out of five top answers that merely showed ways how to write undefined behaviour more elegantly.
Turns out natural intelligence gives you wrong answers, too!
I, for one, welcome our new AI wage slaves!
12:42
Diving championships still give points for a belly-flop if the execution was good until that point. Just sayin'
 
3 hours later…
15:13
@PM2Ring I got other answer: ai.stackexchange.com/questions/45963/… :D
 
2 hours later…
17:33
I wish dependency injection would catch on. But not the lame intra-program kind, no, I want dependency injection between different programs. I don't want to remember where I saved my pypi API token, then waste half an hour trying to figure out where flit saved the its old outdated token and how to replace it with the new one. I want to live in a world where, after I have created the token on pypi, flit automagically has access to it
That sounds like a job for Batm... erm, password managers, I mean.
Kind of, but not really. Password managers want a domain/id, a username, and a password. Problem 1 is that pypi doesn't need a user name. Problem 2 is that you can have per-project tokens or a single token for all of your projects, so what would be the domain/id for the password manager?
And problem 3 is that password managers only solve this problem for passwords and no other kind of data
Proper DI would at the very least make environment variables redundant, and maybe even config files as well
18:02
@Aran-Fey look at Akeyless
18:32
@Aran-Fey Hm, it's at least possible for password managers to do that. I use 1Password for example also as an SSH Agent
Admittedly, perhaps what you describe is more suited to something like KeyChain into which applications can dump and retrieve keys as well.

« first day (4989 days earlier)      last day (174 days later) »