173 points · by pizza · 5y ago · 54 comments
It's not that cups/teaspoons aren't universal that makes them noteworthy, it's that they're volumetric. You should be measuring your dry ingredients by weight. The unit isn't that important, we can convert once you start measuring properly.
But these guidelines for how to measure flour by volume are also important simply for historical reasons: lots of the most respected cookbooks measure by volume, not by weight.
1 US tablespoon = 14.8 mL = 3 teaspoon
A metric tablespoon is exactly equal to 15 mL
The Australian definition: 1 tablespoon = 20 mL = 4 teaspoons
> https://en.wikipedia.org/wiki/Teaspoon > https://en.wikipedia.org/wiki/Tablespoon
Now my so gave me a weird look. I had all the ingredients in the bowl and I said, "It's a cookie!"
Edit: after reading your link, it appears to me that it is graduated in imperial pints, not US pints.
So you have 500ml of something, then 1 cup of something, and temperatures in Fahrenheit and you have to guess if it is US cups, or whatever cups the origin country of the video uses.
The total weight (or mass) of flour in the recipe is 100%, and all ingredients are measured in terms of that. You do end up with very small percentages for ingredients like yeast, but in general it’s nice because you can easily see for instance how sweet a recipe is based on how much sugar is added as a percentage of the total flour.
I do wish normal cooking recipes had a similar convention - it's rare that I've ever used exact amounts since the ratio and technique are always more important.
In my mind it stands in contrast to the SMART stats hard drive failure model post from a few days ago - that was an inappropriate approach AND the person was putting forward as actually being a valid analysis workflow & conclusion.
This post is obviously just for giggles, and it’s very good.
For example, "1/2 cup of diced tomatoes or a can of tomatoes (preferably san marzano)". This sort of freeform text doesn't suit regex very well but also lacks substantial context clues. You'd most likely use named entity recognition which could recognize that "1/2" is a quantity, "cup" is the unit, etc. but I haven't gotten very good results yet.
Maybe I'll write up a post when I land on a solution.
But are these challenges insurmountable? Well, maybe a few would limit you in some respects, but it certainly can’t be denied that some intrepid coder-cook could push this concept somewhat further.
You could also turn this all around and have a “consensus recipe generator.” Type in “pesto genovese” and it gives you a best guess of ingredients and amounts, with links to some recipes roughly matching those consensus amounts, perhaps with notable variations/“nearby” recipe clusters (sun-dried tomato pesto? or just the most popular pine nut substitute?) noted too.
But, I was staring at the Adam formula and thought of something. I'm not sure if it makes sense, but there seems to be an "alternate" way to accumulate gradients:
For each training example, compute the gradients and apply the gradients. However, we apply them in a special way. The final step of adam normally looks like this:
param = param - (lr * m_t / (v_sqrt + epsilon_t))
I propose accumulating the gradients like this: accum = accum + (lr * m_t / (v_sqrt + epsilon_t))
Then after N training samples, when you want to do the actual variable update: param = param - accum
accum = 0
The advantage of this approach (if it works at all) is that Adam updates continuously. Every training example would cause Adam's mean and variance estimators to update. (Recall that the whole point of Adam is that it tracks mean and variance for every parameter in the entire model.)So, in traditional gradient accumulation, those mean and variance slots would only update every N training examples. With this approach, they would update every training example, and then the model params update every N training examples.
It might seem like a small tweak, but adam's variance stats are crucial; it's what makes adam effective. Updating the variance 8x more frequently might be an advantage.
one project I would like to do myself is a followup to YY Ahn et al's Flavor Networks research, but this time with some extra.. `zest`: using the flavor and ingredient networks, but turbocharging the model using some kind of molecular representation of the flavor compounds using e.g. dgl-lifesci for graph-based representations of individual molecules.
Basically instead of
food <-> ingredients <-> flavor molecules (strings) relations
use
food <-> ingredients <-> flavor molecule (graphs)
since graph neural networks are all the rage these days. I already made a kind of graph neural network thingy that works similarly for the AICrowd Learning to Smell competition that was kind of similar :) https://www.aicrowd.com/challenges/learning-to-smell
https://blog.google/products/google-cloud/just-desserts-baki...
I wrote it up around then too. Haven't tried the recipe, but the cakies look legit.
So the outside was a bit more crispy that I'd expect, but it wasn't burnt. The inside was definitely cakie - not fluffy enough to be called cake, but not solid or hard enough to be a proper cookie (the outside was cookie-like). Quite edible, but it turns out you can actually use too many chocolate chips....
Next step: integrate the model with the machine. I wasn't able to reproduce this (couldn't find a link to the data in the article, the code to train the model, etc).
So how do we stop the cycle? Dont empower the masses. Just yet. Dont work for execs pushing such narratives. If you are in positions of authority sideline them. They dont know what they are doing. Scaling everything is a prime directive for these robots and they are too dumb and unimaginative to rewrite their own code let alone decide what is good for the population.