Path: blob/master/Generative NLP Models using Python/Lab for Neural Network Fundamentals.ipynb
3074 views
Kernel: Python 3 (ipykernel)
Lab Exercise: Neural Network for Sequence Generation
Objective:build and train simple neural networks to model two different functions:
Linear: y = 2 * X (50 random data points)
Non-linear: y = X² (100 random data points)
In [1]:
Model 1: Linear Relationship (y = 2X)
In [2]:
Out[2]:
C:\Users\Suyashi144893\AppData\Local\anaconda3\Lib\site-packages\keras\src\layers\core\dense.py:87: UserWarning: Do not pass an `input_shape`/`input_dim` argument to a layer. When using Sequential models, prefer using an `Input(shape)` object as the first layer in the model instead.
super().__init__(activity_regularizer=activity_regularizer, **kwargs)
2/2 ━━━━━━━━━━━━━━━━━━━━ 0s 27ms/step
Model 2: Non-Linear Relationship (y = X²)
In [3]:
Out[3]:
4/4 ━━━━━━━━━━━━━━━━━━━━ 0s 13ms/step
In [ ]: