#A template for when we actually build the model.
import numpy as np
from sklearn.model_selection import train_test_split
from tensorflow.keras.layers import Dense, LSTM, Dropout
from tensorflow.keras import Sequential
categories = [] #List out category string names here
reproducibility = 7 #Constant seed for reproducibility
np.random.seed(reproducibility)
#Load the data here; probably pickle or something like that
train_x,test_x,train_y,test_y = train_test_split(x,y,
                                test_size=0.2,random_state=reproducibility)
model = Sequential()
#Layers will go here
#Compiled given that we're working with categorization.
model.add(Dense(len(categories),activation="softmax"))
model.compile(optimizer="adam",
loss="categorical_crossentropy",metrics=['accuracy'])
#--
bsize=64
epochs=1000
#--
model.fit(x=train_x,y=train_y, verbose=1,
            validation_data=(test_x,test_y),batch_size=bsize,epochs=epochs)
#A template for when we actually build the model.
import numpy as np
from sklearn.model_selection import train_test_split
from tensorflow.keras.layers import Dense, LSTM, Dropout
from tensorflow.keras import Sequential
categories = [] #List out category string names here
reproducibility = 7 #Constant seed for reproducibility
np.random.seed(reproducibility)
#Load the data here; probably pickle or something like that
train_x,test_x,train_y,test_y = train_test_split(x,y,
                                test_size=0.2,random_state=reproducibility)
model = Sequential()
#Layers will go here
#Compiled given that we're working with categorization.
model.add(Dense(len(categories),activation="softmax"))
model.compile(optimizer="adam",
loss="categorical_crossentropy",metrics=['accuracy'])
#--
bsize=64
epochs=1000
#--
model.fit(x=train_x,y=train_y, verbose=1,
            validation_data=(test_x,test_y),batch_size=bsize,epochs=epochs)
#A template for when we actually build the model. #List out category string names here #Constant seed for reproducibility #Load the data here; probably pickle or something like that #Layers will go here #Compiled given that we're working with categorization. #-- #--