Alex's Sandbox

Submitted by Alex.Dacey@edd… on Thu, 07/13/2023 - 15:09
Sub Topics

code between here

 
 
 

and here

Pre and code tags:

This is code,
how is this displayed?

 

1 of 12
 

List:

  1. text and gist goes here:
     
  2. text and gist goes here:
     
  3. text and gist goes here:
     
  4. no gist goes here:

Keras is a high-level neural networks API written in Python that runs on top of TensorFlow. It provides an easy-to-use interface for building and training deep learning models.

Coding Activity

Here's an example of creating a Keras model using the Sequential API. The code shown below can be accessed here.  

  1. A sequential model is created using keras.Sequential(). The model architecture is defined by adding layers to the sequential model. Here, we have a dense layer with 64 units and ReLU activation as the first layer, and a dense layer with 10 units and softmax activation as the second layer.
  2. The model is compiled using the compile() method. Here, we specify the optimizer (e.g., Adam), the loss function (e.g., sparse categorical cross-entropy for multi-class classification), and the metrics to evaluate the model's performance (e.g., accuracy).

     
  3. Once the model is compiled, it is ready to be trained on the data using the fit() method. This involves providing the training data (input features and corresponding labels), specifying the batch size and number of epochs, and optionally specifying validation data for monitoring the model's performance during training.
    The fit() method updates the model's parameters using backpropagation and adjusts them to minimize the specified loss function. The model is trained for the specified number of epochs, with the training data divided into batches of size 32. Validation data can be provided to evaluate the model's performance on unseen data after each epoch. 

     

     

     

  4. After training, the model can be used for making predictions on new data using the predict() method. The predict() method takes the input data and returns the model's predictions.
 

Overall, Keras provides a user-friendly and intuitive way to build, compile, train, and evaluate deep learning models. It abstracts away the complexities of low-level operations, allowing researchers and practitioners to focus on designing and experimenting with various neural network architectures.

Learning Activity

Use information from this course and your own research to consider the following questions:

  1. What is parameterized learning and what are its benefits and challenges?
  2. What are the functions of weights and biases?

This will be an embedded Panopto video:

 

Module Linking
Main Topic Image
Flowers
Is Study Guide?
Off
Is Assessment Consultation?
Off