Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/master/Custom and Distributed Training with Tensorflow/Week 1 - Differentiation and Gradients/C2W1_Assignment.ipynb
Views: 13372
Basic Tensor operations and GradientTape.
In this graded assignment, you will perform different tensor operations as well as use GradientTape. These are important building blocks for the next parts of this course so it's important to master the basics. Let's begin!
Exercise 1 - tf.constant
Creates a constant tensor from a tensor-like object.
Note that for future docstrings, the type EagerTensor
will be used as a shortened version of tensorflow.python.framework.ops.EagerTensor
.
Exercise 2 - tf.square
Computes the square of a tensor element-wise.
Exercise 3 - tf.reshape
Reshapes a tensor.
Exercise 4 - tf.cast
Casts a tensor to a new type.
Exercise 5 - tf.multiply
Returns an element-wise x * y.
Exercise 6 - tf.add
Returns x + y element-wise.
Exercise 7 - Gradient Tape
Implement the function tf_gradient_tape
by replacing the instances of None
in the code below. The instructions are given in the code comments.
You can review the docs or revisit the lectures to complete this task.
Congratulations on finishing this week's assignment!
Keep it up!