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

Update of build.py for TensorFlow 2 #10

Open
eddybogosian opened this issue Feb 5, 2021 · 5 comments
Open

Update of build.py for TensorFlow 2 #10

eddybogosian opened this issue Feb 5, 2021 · 5 comments

Comments

@eddybogosian
Copy link

Hey everyone,

I was testing this out and found a few changes that need to be made to the build.py script.

Remove:

  1. CuDNNLSTM
  2. CuDNNGRU (they are no longer called like that).

Substitute:

  1. tf.ConfigProto with tf.compat.v1.ConfigProto
  2. tf.Session() with tf.compat.v1.Session
    Same parameters, just change the syntax.

This is just a quick fix and should be rewritten for the new version of tensorflow.

Great work kartikmadan!

@eddybogosian
Copy link
Author

To clarify, remove CuDNNLSTM and CuDNNGRU from the "keras.layers import"
Remove the CuDNN prefix for the CuDNNLSTM and CuDNNGRU from the "if isCuda:" architecture definition as the new syntax does not use that prefix any longer and this still maintains the use of training in GPU.

Attached is the build script as of now. It still has an issue where, when you run the training sequence, you get a "TypeError": '<' not supported between instances of 'function' and 'str'.

From what I gathered, it looks like some variable is being declared as a string or not defined as an int.

At first I thought this was the "if(bars < window_size):", but even trying to define them as integers and even commenting out the if check didn't work. If I find something I'll update with what I have.

build.py.txt

@SiriluckLor
Copy link

Hi Sir,
I got some error from file: build.py
eval = regressor.evaluate(X_test, scaler.transform(test_set.reshape(-1,1))) <----- error

....\AppData\Local\Programs\Python\Python38\lib\site-packages\tensorflow\python\util\nest.py:416 flatten
return _pywrap_utils.Flatten(structure, expand_composites)
TypeError: '<' not supported between instances of 'function' and 'str'

therefore, anybody, please help me to solve this problem.

@QLaHPD
Copy link

QLaHPD commented Jul 13, 2021

SiriluckLor, did you managed to connect the socketserver to the mql5?

@SiriluckLor
Copy link

SiriluckLor commented Jul 15, 2021 via email

@troski2
Copy link

troski2 commented Dec 8, 2022

SiriluckLor, did you managed to connect the socketserver to the mql5?

In MetaTrader, you have to allow connections to localhost (Tools>Options>Expert Advisors):

imagen

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

4 participants