Sudoku at the hardest difficulty also has this, but usually the errors manifest a bit more quickly. It feels in this mode you could end up finding your error 'at the end' and have an absolutely diabolical time debugging your error?
647 karma · joined May 4, 2017
Sudoku at the hardest difficulty also has this, but usually the errors manifest a bit more quickly. It feels in this mode you could end up finding your error 'at the end' and have an absolutely diabolical time debugging your error?
The reason I say that is, if we go with PyTorch, you basically have 2 options for multi-GPU training.
- DataParallel - where you clone your model over each GPU, but each one functions independently, and after each 'training step' they pool their data. This has downsides, in that you don't get to process intermediate layer outputs and synchronise your batch normalisation layers - so you can't use it to train 'big' models. It just makes your smaller models train more quickly. However, you can at least use these in a 'normal' training script.
- DistributedDataParallel - this is 'proper' multi-GPU training - you can now train big models and put a little bit of data on each GPU, and have then synchronise their results after each layer. However, this can be very annoying to use - each GPU runs in its own background process which is either spawned or forked (depending on Windows/Linux) and you therefore cannot run it in an iPython notebook, or an interactive Python console. It also makes tracking metrics etc. MUCH harder - because you need to reduce your metrics over each GPU process (because otherwise you get 4 accuracies, 4 mean squared errors etc. if you have 4 GPUs, and each process only sees one of them).
I personally prefer having 1 GPU with 24 Gb RAM over 3 GPU with 12 Gb RAM - because I can have a larger batch size on each GPU, which is VERY VERY advantageous in large models where you can only have small batch sizes, and batch normalisation starts falling down. I'd rather wait 2x as long for a 'better' model to train.
[1] https://www.youtube.com/watch?v=cKPlPJyQrt4&ab_channel=PyDat...
If I have an array `x` and want to set index 0 to 10, I cannot do:
x[0] = 10
I instead have to do: y = x.at[0].set(10)
I'm sure I could get used to it, but it really puts me off.This is because NNT is actually a terrible metric for any treatment that reduces risk over a long period, including the most important outcomes like mortality.
Imagine a drug that halves your risk of dying of heart disease. Heart disease kills 1 in 4 people in developed countries, and so realistically it would be a no brainer that everyone middle aged or over should take it.
If you did this in a randomised controlled trial, you might recruit 1000 patients, and randomise 500 to this new drug and 500 to placebo. If you ran the trial for a year, you might find 1% of the placebo arm died, and only 0.5% in the control arm. This demonstrates a risk reduction of 0.5%, or a NNT of 200.
An NNT, by conventional teaching, is underwhelming.
Is this the right way to think about it? ABSOLUTELY NOT! The high NNT is a consequence of a low event rate, NOT an ineffective therapy. In preventative medicine, where everyone will EVENTUALLY die of something (and 25% the thing you are looking at), it is the RELATIVE risk reduction (50% here, not 0.5%) that matters.
It's different if you have a single one-off therapy, where all the benefit will have been delivered by a certain timepoint, at which you measure the NNT. But for a lot of medicine it is not that simple, and the NNT sucks.
def zip(ls1, ls2):
return [(ls1[i], ls2[i]) for i in range(min(len(ls1), len(ls2)))]
And indeed you could even use a generator instead: def zip(ls1, ls2):
return ((ls1[i], ls2[i]) for i in range(min(len(ls1), len(ls2))))First, is TF's deployment has always been ahead of Pytorch's (although the gap is closing, especially as Onnx becomes more popular).
However, the more important reason is how amazingly good value TPUs are in terms of their RAM and FLOPS. Although pytorch has XLA support, it just doesn't work as well as TF on TPU pods.
In Kaggle competitions, when the input data can fit on a consumer GPU everyone uses pytorch. When it doesn't, everyone uses the free TPUs on the Kaggle platform and reverts to tensorflow/keras.
PS you are a hero of mine - I’m an academic medical doctor for who CS231n was my first foray into AI, and since then I’ve gone on to gold medal in a couple of Kaggle competitions and secured 5 years of higher research funding to pursue clinical AI. I am immensely grateful to you and Fei-Fei Li.
What you may prefer to do is use the excellent pydicom library for Python, which loads dicom files as numpy arrays, allowing you to convert to any other file format you fancy, whether that be image or video.
To put it into context, a junior doctor in the UK makes £29,384, and they will leave university with close to 6 figure debt, with 7.3% interest rates.
But it's not even just that. Over the last few years, the UK has embraced the roles of non-medically trained physician associates (PA), which in the USA have been a success by relieving medically trained doctors from the more protocolisable jobs, so they can focus on the more difficult. However, a PA earns £39,766.76 - far more than the juniors with none of the responsibility. I won't go into details on the issues about how juniors have to maintain annual portfolios, change hospitals every year etc. etc., because the Royal Colleges say it's necessary to become a good doctor, whereas PAs don't need to do any of it.
So when juniors in the UK see this, that they could have gone to University for 2 years rather than 5, with lower entrance requirements, and end up in a far better financial situation in a shorter time, many of them just don't want to be a doctor anymore.
I can say, without a doubt, that junior doctors will strike in the UK within the next 2 years. I am no longer one, but I completely get where they are coming from, and support them.
However, as soon as they are sat in front of someone and are picking up on the visual clues in facial expressions and body language which make it clear that what they are saying is actually affecting a real person with feelings, almost everyone has a profound sense of empathy or guilt.
"...is the peculiar manner in which the Fourier series of a piecewise continuously differentiable periodic function behaves at a jump discontinuity. The nth partial sum of the Fourier series has large oscillations near the jump, which might increase the maximum of the partial sum above that of the function itself"
I have a PhD in machine learning and also an interest in magnetic resonance imaging. Sometimes Gibbs phenomenon leads to an artefact (called Gibbs artefact) that we see in our images of the heart when we are doing a certain sequence called stress perfusion cardiac MRI. I am not an idiot, and yet I actually cannot understand the first paragraph of this page.
Mathematics articles on Wikipedia so frequently read in a way that is only interpretable by mathematicians or physicists. This is not the point of Wikipedia! You don't even have to pick an advanced topic - the Taylor Series is taught in high school maths in the UK, and look at the introduction to its Wikpedia article, it's ridiculous!
Articles about relatively esoteric topics in the biological sciences are almost always much better, and at least try to first introduce the topic in a way the average reader can understand, e.g. https://en.wikipedia.org/wiki/Supraventricular_tachycardia
The first point explains something as basic as absolute and relative errors. Great.
1 page down (s)he's casually thrown in function notation with R representing the real numbers with no explanation. Anyone who isn't familiar with this notation is immediately intimidated. But I'd wager almost anyone who is familiar with it didn't need to read the page before it. But also, I think it's just unnecessary to be this specific in the first place, if you're trying to quickly explain concepts.
It's actually a huge problem in maths and even Wikipedia (I feel) is pretty guilty of this.
If you take a (relatively) key mathematical concept, such as the Taylor series, then the opening gambit is completely incomprehensible to anyone who isn't already knowledgeable in maths: https://en.wikipedia.org/wiki/Taylor_series
This, to me, seems in huge contrast with other scientific fields. Medicine wikipedia, for example, caters towards the "average reader" first, and doctors later. This is entirely appropriate for an encyclopedia. For example: https://en.wikipedia.org/wiki/AV_nodal_reentrant_tachycardia...
If that's the case, would a nice solution be to model it as a recurrent neural network, e.g. pytorch or jax, with a single convolutional layer, with a single kernel, which you don't backprop to, and then try to minimise to loss with reference to the target image, by backpropagating to the input image?
It then becomes highly analogous to Google's deepdream, but instead of optimising the image for the output class, you optimise it to the output image.
Their best results involve 'pretraining' on a dataset of 300 million examples, before 'tuning' it on the actual ImageNet training dataset as above.
However, I do have one request for it. Getting the argmax of a multi-dimensional array, in terms of the array's dimensions, is difficult for new users.
np.argmax(np.array([[1,2,3],[1,9,3],[1,2,3]])) is 4, rather than (1,1). I understand why, but it seems strange to me that argmax cannot return a value the user can use to index their array.
Having to then feed that `4` into unravel_index() with the array's shape as a parameter seems less elegant than say passing a parameter of "as_index=True" to the argmax.
However, there are certain situations where I cannot imagine working without OOP.
For example, GUI development. Surely nobody would want to do without having a Textbox, Button, inherit from a general Widget, and have all the methods like .enable(), .click(), and properties like enabled, events like on_click, etc.?
Similarly, a computer game, having an EnemyDemon inherit from Enemy, so that it has .kill(), .damage(), and properties for health, speed etc.?
I'd really like to know how the most anti-OOPers think situations like this should be handled? (I'm not arguing, genuinely interested)
I know that isn't how dplyr works, but it feels more Pythonic, and this solution isn't entirely analogous to dplyr anyway.
This approach seems a little complicated, though I'm sure with some use I could learn to enjoy it.
Everyone knows JAX is what Google realised Tensorflow should have been when they realised how much of a joy Pytorch was to use. I actually think JAX does offer some advantages, not least true numpy interoperability. However, not mentioning *torch a single time in the blog post seems a little disingenuous for a Google-owned deep learning enterprise.