Remove the hard coded block for feature count and disable CUDA
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import os
|
||||
os.environ["CUDA_VISIBLE_DEVICES"] = "-1"
|
||||
import yfinance as yf
|
||||
import features
|
||||
import matplotlib
|
||||
|
||||
@@ -3,6 +3,7 @@ import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
import datapuller
|
||||
import os
|
||||
os.environ["CUDA_VISIBLE_DEVICES"] = "-1"
|
||||
from sklearn.model_selection import train_test_split
|
||||
from keras import Sequential, layers, optimizers
|
||||
|
||||
@@ -31,7 +32,7 @@ def TrainAI():
|
||||
|
||||
# Start with a linear model
|
||||
dnn_linear_model = Sequential([
|
||||
layers.Input(shape=(9,)), # Explicitly tell Keras there are 9 features
|
||||
layers.Input(shape=(train_features.shape[1],)), # Load the feature count dynamically
|
||||
normalizer,
|
||||
layers.Dense(64, activation='relu'),
|
||||
layers.Dense(64, activation='relu'),
|
||||
|
||||
Reference in New Issue
Block a user