Import tensorflow

This commit is contained in:
2026-02-15 21:45:42 -08:00
parent f3e8b90764
commit c530630153
20524 changed files with 9017694 additions and 25 deletions
+5 -24
View File
@@ -1,25 +1,9 @@
from datetime import date, datetime
from datapuller import DataPuller
from database import DataBase
import tensorflow as tf
import keras
from keras.layers import Dense, Flatten, Conv2D
from keras import Model
def main():
# Load the database object
db = DataBase()
# If we havent already pulled the stock data today
if db.GetKey("LastRun") != str(date.today()):
# Update the data store in the data folder
DataPuller.pull()
# Update the last run to today
db.SetKey("LastRun", str(date.today()))
# Lazy Load in the AI algorithms so yfinance works properly
import tensorflow as tf
import keras
from keras.layers import Dense, Flatten, Conv2D
from keras import Model
mnist = keras.datasets.mnist
(x_train, y_train), (x_test, y_test) = mnist.load_data()
@@ -33,7 +17,4 @@ def main():
train_ds = tf.data.Dataset.from_tensor_slices(
(x_train, y_train)).shuffle(10000).batch(32)
test_ds = tf.data.Dataset.from_tensor_slices((x_test, y_test)).batch(32)
if __name__ == "__main__":
main()
test_ds = tf.data.Dataset.from_tensor_slices((x_test, y_test)).batch(32)