Open holydick99 opened 2 months ago
I have a same issue, did you solve it??
I have a same issue, did you solve it??
the problem is there are too many 0 or 1 in my arrary, after i get mean in different channel it can run
I have a same issue, did you solve it??
the problem is there are too many 0 or 1 in my arrary, after i get mean in different channel it can run
Was there any problem with the function 'zscore'?? I think my problem is in zscore function,
def zscore(a, axis=0, ddof=0):
mns = a.mean(dim=axis)
sstd = a.std(dim=axis, unbiased=(ddof == 1))
if axis and mns.dim() < a.dim():
x=(a - mns.unsqueeze(axis)).div(sstd.unsqueeze(axis)) # **<<after this code 1**
return x.masked_fill(torch.isnan(x), 0) # nan -> 0
#return torch.nan_to_num((a - mns.unsqueeze(axis)).div(sstd.unsqueeze(axis)))
else:
x=a.sub_(mns).div(sstd) # **<<after this code 2**
return x.masked_fill(torch.isnan(x), 0) # nan -> 0
#return torch.nan_to_num(a.sub_(mns).div(sstd))
after these code, variable x contains 'inf' or '-inf'. It causes the error :(
I can't find out solution about it...
It's seems without any ERROR. I only can give you my view, the problem you are facing is likely due to division by zero or you fill too many 0 in your data, you can try replace NAN by mean. I'm just year 2 student of university so maybe my solutions are not so correctly
after run my dataset there are sth worng, and i can't find the solution on the internet. So sad