Open zbliu98 opened 2 years ago
I also have the same question ,have you solve it?
I also have this similar problem running python STAG_gen.py
I just overcame this problem:
A_eq = np.array(A_eq).astype(np.float)#added b_eq = np.concatenate([p, q]) D = np.array(D).astype(np.float)#added
since b_eq is float type, while A_eq and D are int type, there exists a discrepancy.
I just overcame this problem:
A_eq = np.array(A_eq).astype(np.float)#added b_eq = np.concatenate([p, q]) D = np.array(D).astype(np.float)#added
since b_eq is float type, while A_eq and D are int type, there exists a discrepancy.
This error still appears after the modification according to your method. Have you made any other modifications?looking forward to your reply.
Try using np.nan_to_num
我刚刚克服了这个问题:
A_eq = np.array(A_eq).astype(np.float)#added b_eq = np.concatenate([p, q]) D = np.array(D).astype(np.float)#added
由于 b_eq 是 float 类型,而 A_eq 和 D 是 int 类型,因此存在差异。按照你的方法修改后还是会出现这个错误。您是否进行了其他修改?期待您的回复。
尝试通过上述方式更改代码,也不成解决这个问题,不知道您现在是否解决了这个问题,期待您的回复。
我刚刚克服了这个问题:
A_eq = np.array(A_eq).astype(np.float)#added b_eq = np.concatenate([p, q]) D = np.array(D).astype(np.float)#added
由于 b_eq 是 float 类型,而 A_eq 和 D 是 int 类型,因此存在差异。按照你的方法修改后还是会出现这个错误。您是否进行了其他修改?期待您的回复。
尝试通过上述方式更改代码,也不成解决这个问题,不知道您现在是否解决了这个问题,期待您的回复。 [Schwaldlander] has replied. Try using np.nan_to_num
我刚刚克服了这个问题:
A_eq = np.array(A_eq).astype(np.float)#added b_eq = np.concatenate([p, q]) D = np.array(D).astype(np.float)#added
由于 b_eq 是 float 类型,而 A_eq 和 D 是 int 类型,因此存在差异。按照你的方法修改后还是会出现这个错误。您是否进行了其他修改?期待您的回复。
尝试通过上述方式更改代码,也不成解决这个问题,不知道您现在是否解决了这个问题,期待您的回复。 [Schwaldlander] has replied. Try using np.nan_to_num
thanks, i have solved this question.
Where should I apply this method using np.nan_to_num
np.nan_to_num I added the following two lines at line 27 of the source code to solve this problem:
np.nan_to_num(A_eq, copy=False, nan=0.0, posinf=None, neginf=None)
np.nan_to_num(D, copy=False, nan=0.0, posinf=None, neginf=None)
请问一下,该模型与AGCRN模型做了对比实验,但是AGCRN原论文并没有对03,07数据集的实验部分,想请教一下您在AGCRN的03,07数据集的参数配置,调参一直没有达到您论文对比实验的指标。
我刚刚克服了这个问题:
A_eq = np.array(A_eq).astype(np.float)#added b_eq = np.concatenate([p, q]) D = np.array(D).astype(np.float)#added
由于 b_eq 是 float 类型,而 A_eq 和 D 是 int 类型,因此存在差异。按照你的方法修改后还是会出现这个错误。您是否进行了其他修改?期待您的回复。
尝试通过上述方式更改代码,也不成解决这个问题,不知道您现在是否解决了这个问题,期待您的回复。
请问您是如何解决的 我也正在被这个问题困扰
np.nan_to_num I added the following two lines at line 27 of the source code to solve this problem:
np.nan_to_num(A_eq, copy=False, nan=0.0, posinf=None, neginf=None)
np.nan_to_num(D, copy=False, nan=0.0, posinf=None, neginf=None)
np.nan_to_num I added the following two lines at line 27 of the source code to solve this problem:
np.nan_to_num(A_eq, copy=False, nan=0.0, posinf=None, neginf=None)
np.nan_to_num(D, copy=False, nan=0.0, posinf=None, neginf=None)
I also have sloved the problem through this method,thanks a lot~