November 2019
Intermediate to advanced
296 pages
7h 52m
English
The dataset that's going to be transformed by FFT is a single cosine curve. The phase of the wave is illustrated as xs, which is pi multiplied by the continuous range. The cosine and sine curve return
:
const doublePi = tf.scalar(2.0 * Math.PI);const xs = tf.mul(doublePi, tf.range(-1.5, 1.5, 0.1));const ys = tf.cos(xs);
The original curve is drawn as follows. The number of samples in the dataset is 30, which is decided by the number of points that are generated by tf.range:

Read now
Unlock full access