From b51e5f862faeb2df0715b50e05b979c0b5682c0a Mon Sep 17 00:00:00 2001 From: Ankit Podder <50513363+ANKITPODDER2000@users.noreply.github.com> Date: Wed, 30 Sep 2020 20:36:34 +0530 Subject: [PATCH] Update model.py --- model.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/model.py b/model.py index 0b6af47..f8aec21 100644 --- a/model.py +++ b/model.py @@ -1,10 +1,17 @@ +#Import section import numpy as np +print("Version of np : " , np.__version__) import tensorflow as tf +print("Version of tensorflow : " , tf.__version__) import matplotlib.pyplot as plt x = np.array([1,2,3,4,5,6,7,9]) y = x*2+10 +#ploting for un-normalize data +plt.plot(x,y) +plt.show() + mean_x = x.mean() x = x - mean_x std_x = x.std() @@ -15,6 +22,11 @@ std_y = y.std() y = y / std_y +#ploting for normalize data +plt.plot(x,y) +plt.show() + + print("x is : ",x) print("y is : ",y) @@ -28,6 +40,6 @@ import matplotlib.pyplot as plt plt.plot(his.history['loss']) plt.title("Loss Curve") -plt.plot() +plt.show() print("Prediction : ",(model.predict((np.array([10,20,30,80])-mean_x)/std_x) * std_y)+mean_y)