Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No predicted number #2

Open
CyberttJOe opened this issue Mar 2, 2023 · 3 comments
Open

No predicted number #2

CyberttJOe opened this issue Mar 2, 2023 · 3 comments

Comments

@CyberttJOe
Copy link

Hi Dr Jindeok,

using the same script and data, but with the latest Tensorflow version, i run the Preprocessing_Rawdata script, the result is empty.

image


NameError Traceback (most recent call last)
Cell In[23], line 1
----> 1 predicted

NameError: name 'predicted' is not defined

Could you give me some suggestions.

Thanks a lot !

Cybertt

@jindeok
Copy link
Owner

jindeok commented Mar 2, 2023

The script Preprocessing_Rawdata.ipynb is for providing reference code of preprocessing raw data in case you want to implement latest Lottery data (and the codes are not trimmed. I'm sorry for this).

If you persist on using that script, delete "predicted" variabe and use "ww" variable instead.

But I recommend you to simply run "main.py" in your preferred IDE.

Have a nice day :)

@CyberttJOe
Copy link
Author

Simply running 'main.py' scripts lead to below error:

2023-03-03 13:26:53.113558: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
958/958 - 3s - loss: 0.1354 - 3s/epoch - 3ms/step
Traceback (most recent call last):
File "C:\eastmoney\Lottery_prediction\main.py", line 47, in
prediction_number_set = LotteryLSTM.predict_lottery_numbers(args.mode2, args.trial)
File "C:\eastmoney\Lottery_prediction\model.py", line 43, in predict_lottery_numbers
yhat = self.model.predict(self.test_X) # [1x45] dim
File "C:\Users\wzkong\miniconda3\lib\site-packages\keras\utils\traceback_utils.py", line 70, in error_handler
raise e.with_traceback(filtered_tb) from None
File "C:\Users\wzkong\miniconda3\lib\site-packages\keras\engine\training.py", line 2375, in predict
raise ValueError(
ValueError: Unexpected result of predict_function (Empty batch_outputs). Please use Model.compile(..., run_eagerly=True), or tf.config.run_functions_eagerly(True) for more information of where went wrong, or file a issue/bug to tf.keras.

That's the reason that i turn to preprocessing raw data.

Please give further suggestions.

By the way, if final predict include number zero,what's that mean?

Thanks & regards!

@dicotom
Copy link

dicotom commented Sep 22, 2024

In the data file:
if self.mode == 'predict':
test = values[len(dataset)-self.window_prev-1:len(dataset)-self.window_prev, :] # Keep it 2D
#test = values[len(dataset)-self.window_prev-1, :]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants