Hacker Newsnew | past | comments | ask | show | jobs | submit | vvanirudh's commentslogin

What sort of help are you looking for?


If sampling from the density is the only goal, then you are absolutely right. Can directly estimate empirical CDF as you pointed below. But histograms can still be useful to approximate the PDF itself? (taking the derivative of the empirical CDF to estimate PDF is wild as you said)


Yes, if you need an approximate pdf. I've found that when I'm working non-parametrically (or in robust statistics) I like to stay in cdf space or use quantile functions more than trying to use those nasty derivatives.


Neat! That is so simple and in hindsight, makes a lot of sense. Thanks!


Yep! The next post would be on Kernel density estimation -- wanted to start from histograms as they are still a useful tool in 1-D and 2-D density estimation, and you don't have to store the data either (unlike KDE)


I should have read to the end of your post:

'I will describe a very popular nonparametric method, Kernel Density Estimation, that also follows strategy 1 and is much more scalable to higher dimensions than histograms.'


Haha no worries!


Hahaha ty ty!


Running into this error `RuntimeError: expected scalar type BFloat16 but found Float` when I run `txt2img.py`


SOLUTION - append the command with `--precision full`


Awesome, that works

For reference the full command:

`python scripts/txt2img.py \ --prompt "a red juicy apple floating in outer space, like a planet" \ --n_samples 1 --n_iter 1 --plms --precision full`


Confirming I'm stuck on the same error when running the tutorial-instructed python scripts/txt2img.py command

    RuntimeError: expected scalar type BFloat16 but found Float


Yes, me too! Please post here if you find a solution for all the other people that come and find this by commmand-F'ing this error


I'm stuck on 'RuntimeError: expected scalar type BFloat16 but found Float' too. Most relevant links seems https://github.com/CompVis/stable-diffusion/pull/47 but I'm not sure. Please post when there is a solution.


That might have to do with your Mac OS version. Pre-12.4 Mac OS does not allow the Torch backend to use the M1 GPU, and so the script attempts to use the cpu, but then the cpu does not support half-precision numbers.


Yep---that was it in my case. I had the same error but it went away after upgrading to MacOS 12.5. You should actually check if your PyTorch installation can detect the mps backend: `torch.backends.mps.is_available()` must be equal to True.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: