Open vdfdfhgbstdh opened 4 years ago
same issue here, saw in some tensorflow threads that its due to inputs with a different number of values, IE ohlcv and ind are different lengths, but I havent found a fix for it yet. ill keep you updated if I find something.
so I ran it in a jupyter notebook to get a closer look at the variables and ohlcv_test has lengths of (675, 50, 5) while tech_ind_test has lengths of (675, 1) and the error is returning x size: 50, 1 so it seems to be skipping over the 675 values for both arrays and trying to compare the 50 and the 1. not sure what to do about it, but that seems to be whats happening.
i found the problem and the fix:
In predicted_price_tomorrow = np.squeeze(y_normaliser.inverse_transform(model.predict([[ohlcv], [ind]])))
,
model.predict()
is expecting (in this case) a list of arrays. Instead, we are currently passing in a list of lists. To fix this, all you need to do is change model.predict([[ohlcv], [ind]])
to model.predict([np.array([ohlcv]), np.array([ind])])
I get this error when running the trading_algo.py:
`ValueError Traceback (most recent call last)