Skip to content

Instantly share code, notes, and snippets.

@DerekChia
Last active November 14, 2021 23:49
Show Gist options
  • Save DerekChia/bbbb43dbec9ea0b77ca8f4f609ad98c4 to your computer and use it in GitHub Desktop.
Save DerekChia/bbbb43dbec9ea0b77ca8f4f609ad98c4 to your computer and use it in GitHub Desktop.
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
def generate_dataset():
x_batch = np.linspace(0, 2, 100)
y_batch = 1.5 * x_batch + np.random.randn(*x_batch.shape) * 0.2 + 0.5
return x_batch, y_batch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment