import pandas as pd import numpy as np from keras.models import Sequential from keras.layers import Dense from keras.layers import Dropout from keras.layers import LSTM from keras.optimizers import Adam from sklearn.preprocessing import MinMaxScaler def create_dataset(dataset, datasetClass, look_back): dataX, dataY = [], [] for i in range(len(dataset)-look_back-1): a = dataset[i:(i+look_back), 0] dataX.append(a) dataY.append(datasetClass[:,(i+look_back):(i+look_back+1)]) return np.array(dataX), np.array(dataY) def one_hot_encode(dataset): data = np.zeros((11, len(dataset)),dtype='int') for i in range(len(dataset)): data[dataset[i]-1,i] = 1 return data
I ran this on Ubuntu and on Windows. Tested on windows with keras v 2.0.4 and 2.0.8, on ubuntu with 2.0.5 (the latest version is available through the cond)
The accuracy on the windows is 17%, and the categorical cross-entropy is ~ 2, it slowly converges, but it starts there consistently
accuracy on ubuntu is 98%, and categorical cross-entropy is 0, and it actually does not change
The only difference in the code is the path to the csv files, the csv files are exactly the same. What could lead to such a radical difference?
If the difference was a percentage or two, I could write it as a random initialization stop / tf, but how important is it to be pure coincidence
edit: the solution turned out to fix categorical csv files, although they were utf-8, apparently there was something else to get them to play with Linux when they were created on Windows. I'm not sure if I am allowed to mark my own answer as βacceptedβ