| General > General Technical Chat |
| SOLVED: “Integrals” & “integrator”: clear … AS MUD |
| << < (5/5) |
| rstofer:
Machine Learning (at least Deep Learning) is nothing more than messing around with partial derivates in N dimensional space where N can be a really big number (multiple thousand dimensional space). And we want to follow a ball down the slope toward a minimum cost (gradient descent). Even the well understood Digit Recognition problem uses 784 dimensional space. It's the equivalent of "Hello World!" for Deep Neural Networks. About 17 lines of Python/Tensorflow/Keras code according to the book but I added white space so 26 lines. https://en.wikipedia.org/wiki/MNIST_database It's hard (impossible) to even comprehend 784 dimensional space. And that's just "Hello World!". "Deep Learning with Python, Second Edition" Francois Chollet https://www.amazon.com/Learning-Python-Second-Fran%C3%A7ois-Chollet-ebook/dp/B09K81XLN1 Note that the Kindle version costs more than the paperback. I like to read from paperbacks kicking back in my recliner but I like to recreate code from a tablet or PC at a cluttered workstation. I have both incantations. I'm starting to think that a degree in Applied Mathematics would be useful these days. Quoting from the book: --- Code: ---from tensorflow import keras from tensorflow.keras import layers from tensorflow.keras.datasets import mnist (train_images, train_labels), (test_images, test_labels) = mnist.load_data() model = keras.Sequential([ layers.Dense(512, activation = "relu"), layers.Dense( 10, activation = "softmax") ]) model.compile( optimizer = "rmsprop", loss = "sparse_categorical_crossentropy", metrics = ["accuracy"] ) train_images = train_images.reshape((60000, 28 * 28)) train_images = train_images.astype("float32") / 255 test_images = test_images.reshape((10000,28 * 28)) test_images = test_images.astype("float32") / 255 model.fit(train_images, train_labels, epochs = 3, batch_size = 128) test_loss, test_acc = model.evaluate(test_images, test_labels) print(f"test_acc: {test_acc}") --- End code --- This approach gets about 98% accuracy on the test data and some of that isn't even human readable with certainty. |
| Nominal Animal:
Some of the most sensitive image sensors are really just charge integrators below a photoelectric surface. Basically, the number of photons (with wavelength/frequency within the sensitive band) hitting that pixel directly correlates to the charge in that pixel, and thus the charge indicates the brightness of the image at that pixel. Tomography is a method where combining 2D images of the same translucent object/system/material taken at different angles reveals the 3D structure. The idea is that in each 2D image, each point represents an integral of the density through the object/system/material along that ray. For example, if you have three images, each taken perfectly along an axis, then a point in one image will be a row or column of points in the other. If each image is N×N samples/rays, you have N×N×N unknowns (density in each voxel), and 3×N×N equations - an equation for each point in each image (each point being a sum of N voxels' densities – again, switching from continuous integrals to discrete integrals: sums). To be able to resolve each voxel with any kind of sensible probability or reliability, a lot more images are needed; on the order of N, actually. (The exact methods of how this is done in practice are very interesting reading, by the way, if one is interested in computational imaging. Lots of really clever ways of doing this efficiently, without compromising reliability.) |
| Navigation |
| Message Index |
| Previous page |