Double-Deep-Q-Learning-for-Resource-Allocation icon indicating copy to clipboard operation
Double-Deep-Q-Learning-for-Resource-Allocation copied to clipboard

Question about Main code

Open Judithcodes opened this issue 3 years ago • 8 comments

Hello. When i run the main code, i get the error message that Flag model has been defined twice. Did anyone experience this and how did you handle it

image

Judithcodes avatar Mar 19 '21 00:03 Judithcodes

I never got this error when I was working on the code. I have run this program multiple times and in different environments. I request you to share the full error and if you have made some changes then also share those changes as well.

Engineer1999 avatar Mar 19 '21 06:03 Engineer1999

I am actually the code in jupyter lab When i run the initial code. I got the error message in the snip below.

image

so I changed the line:

import tensorflow as tf

to

import tensorflow.compat.v1 as tf

and

tf.app.run()

to

tf.compat.v1.app.run()

I no longer recall the error message that prompted me to add the line of code below:

tf.disable_v2_behavior()
import sys
sys.argv = sys.argv[:1] 

After running the code, i got the error message below:

image

Judithcodes avatar Mar 29 '21 05:03 Judithcodes

I just tried agent.py running from a terminal and i got the initial error message

image

Judithcodes avatar Mar 29 '21 05:03 Judithcodes

I just tried agent.py running from a terminal and i got the initial error message

image

how did you solve this error, I am also getting the same error

apoorvsinghnegi avatar Apr 14 '21 08:04 apoorvsinghnegi

I have been unable to resolve this issue.

Judithcodes avatar Apr 21 '21 23:04 Judithcodes

This is working now

image

I just downgraded my python version to python 3.6 and changed import tensorflow as tf to import tensorflow.compat.v1 as tf then i added

tf.disable_v2_behavior()

All of these in the agent code...

Judithcodes avatar Apr 22 '21 10:04 Judithcodes

I just tried agent.py running from a terminal and i got the initial error message image

how did you solve this error, I am also getting the same error

This may be a problem with your tensorflow version. Some of the tensorflow commands can not use. You can try to downgrade to version 1.12 and run it again

axuey avatar Apr 27 '21 13:04 axuey

Hello, I adjusted the number of vehicles, but it reported an error. Is the number of vehicles adjusted in the position of environment initialization?

1219-wangjindong avatar Jun 01 '23 01:06 1219-wangjindong