mirror of https://github.com/drowe67/phasenn.git
building up test91, still some bugs
parent
e921bc8f1e
commit
d9a3d57396
|
@ -88,8 +88,8 @@ def n0_dft(n0):
|
|||
n0 = K.print_tensor(n0, "x is: ")
|
||||
# note n0 scaled by n0/P_max when represented in NN, too keep it in 0..1 range
|
||||
N=width
|
||||
cos_term = K.cos(n0*P_max*K.cast(K.arange(0,N), dtype='float32')*np.pi/N)
|
||||
sin_term = K.sin(-n0*P_max*K.cast(K.arange(0,N), dtype='float32')*np.pi/N)
|
||||
cos_term = K.cos(n0*K.cast(K.arange(0,N), dtype='float32')*np.pi/N)
|
||||
sin_term = K.sin(-n0*K.cast(K.arange(0,N), dtype='float32')*np.pi/N)
|
||||
return K.concatenate([cos_term,sin_term], axis=-1)
|
||||
|
||||
# testing custom layer against numpy implementation
|
||||
|
|
Loading…
Reference in New Issue