Skip to content

Update model.py #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion model.py
Original file line number Diff line number Diff line change
@@ -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()
Expand All @@ -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)

Expand All @@ -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)