Neural Networks (Shallow/Deep Learning) From Scratch in Python With Geoscience Examples

Ryan (Alireza) Mardani, Marcelo Guarido, Daniel O. Trad, David J. Emery

The CREWES Data Science Initiative hosted a webinar with guest presenter: Ryan A. Mardani, and he sent us a description of the event:

This work aims to implement Neural Networks computations step by step from initial levels using standard python packages such as Numpy. Although there are specialized packages for deep learning (like Tensorflow and Torch) that make such implementation easy and smooth, I would prefer not to use them here because I want to go for more fundamental calculations and get involved in graph computation elaborate array manipulation with Numpy. We will build shallow and deep neural networks models that will predict lithology (shale/sand as binary classification problem) from well logs. We will generate helper functions for each of the following steps, which will be combined in the final model (Shallow & Deep) functions for prediction:

  1. Define the neural network structure (e.g., number of input units and hidden units)
  2. Initialize the model's parameters (weight and bias arrays)
  3. Loop:
    • Implement forward propagation
    • Compute loss
    • Implement backward propagation to get the gradients
    • Update parameters (gradient descent)
  4. Predict

Everything will be done in Python in a live demonstration.