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

i found some question #1

Open
syue0225 opened this issue May 16, 2021 · 5 comments
Open

i found some question #1

syue0225 opened this issue May 16, 2021 · 5 comments

Comments

@syue0225
Copy link

when i run it ,it have some problems
File "E:/python_code/Reinforcement_Learning_Team_Q_learnig_MARL_Multi_Agent_UAV_Spectrum_task-main/Reinforcement_Learning_Team_Q_learnig_MARL_Multi_Agent_UAV_Spectrum_task-main/main.py", line 174, in
csi_coef = get_csi(num_UAV, loc_dict, X_Mat[Step, Eps, :], Y_Mat[Step, Eps, :])
File "E:\python_code\Reinforcement_Learning_Team_Q_learnig_MARL_Multi_Agent_UAV_Spectrum_task-main\Reinforcement_Learning_Team_Q_learnig_MARL_Multi_Agent_UAV_Spectrum_task-main\csi.py", line 158, in get_csi
csi_h[:, source_uav] = np.squeeze(h_S_uav)
ValueError: could not broadcast input array from shape (2,2) into shape (2)

could you help me?

@AlirezaShamsoshoara
Copy link
Owner

@syue0225, Did you change any variables? How many UAVs you have? Keep track of the X and Y Matrices, then see what are the shapes of variables and what values they have?
It is better to do it in debug mode.

@digaamberdhamija
Copy link

digaamberdhamija commented Dec 28, 2021

The issue is in lines 145, 148, 151, and 154 of the file csi.py. The transpose operation to the second argument of np.multiply should not be there as it will produce an output with the wrong dimensions. I have checked and verified the results.

@purbe
Copy link

purbe commented Mar 16, 2022

when i run it ,it have some problems File "E:/python_code/Reinforcement_Learning_Team_Q_learnig_MARL_Multi_Agent_UAV_Spectrum_task-main/Reinforcement_Learning_Team_Q_learnig_MARL_Multi_Agent_UAV_Spectrum_task-main/main.py", line 174, in csi_coef = get_csi(num_UAV, loc_dict, X_Mat[Step, Eps, :], Y_Mat[Step, Eps, :]) File "E:\python_code\Reinforcement_Learning_Team_Q_learnig_MARL_Multi_Agent_UAV_Spectrum_task-main\Reinforcement_Learning_Team_Q_learnig_MARL_Multi_Agent_UAV_Spectrum_task-main\csi.py", line 158, in get_csi csi_h[:, source_uav] = np.squeeze(h_S_uav) ValueError: could not broadcast input array from shape (2,2) into shape (2)

could you help me?

are you able to rectify the error, bcz i'm facing the same issure? plz help me

@purbe
Copy link

purbe commented Mar 16, 2022

The issue is in lines 145, 148, 151, and 154 of the file csi.py. The transpose operation to the second argument of np.multiply should not be there as it will produce an output with the wrong dimensions. I have checked and verified the results.

hey can you help me? after removing transpose still getting the same error. does your code working?

@1234Crystal
Copy link

Traceback (most recent call last):
File "E:/Reinforcement_Learning_Team_Q_learnig_MARL_Multi_Agent_UAV_Spectrum_task-main/main.py", line 272, in
next_state_index=next_state_index, task_diff=task_diff, qVal=qVal)
File "<array_function internals>", line 6, in savez
File "D:\Anaconda3\envs\python37\lib\site-packages\numpy\lib\npyio.py", line 618, in savez
_savez(file, args, kwds, False)
File "D:\Anaconda3\envs\python37\lib\site-packages\numpy\lib\npyio.py", line 715, in _savez
zipf = zipfile_factory(file, mode="w", compression=compression)
File "D:\Anaconda3\envs\python37\lib\site-packages\numpy\lib\npyio.py", line 112, in zipfile_factory
return zipfile.ZipFile(file, *args, **kwargs)
File "D:\Anaconda3\envs\python37\lib\zipfile.py", line 1240, in init
self.fp = io.open(file, filemode)
FileNotFoundError: [Errno 2] No such file or directory: '\data\Out_greedy_Size_10_Run_0_Eps_200_Step_30000.npz'

The file doesn't have Out_greedy_Size_10_Run_0_Eps_200_Step_30000.npz,so what's the problem?Can you help me?

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

5 participants