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'),
|
||||
|
||||
+2
-1
@@ -58,8 +58,9 @@ RUN wget https://www.python.org/ftp/python/3.11.0/Python-3.11.0.tgz && \
|
||||
ln -s /usr/local/bin/python3.11 /usr/local/bin/python && \
|
||||
ln -s /usr/local/bin/pip3.11 /usr/local/bin/pip
|
||||
|
||||
# Dont use CUDA for the tensorflow as the CPU is way faster for this smaller workload
|
||||
RUN pip install --upgrade pip && \
|
||||
pip install tensorflow[and-cuda] \
|
||||
pip install tensorflow \
|
||||
fastparquet \
|
||||
openpyxl \
|
||||
yfinance \
|
||||
|
||||
Reference in New Issue
Block a user