tdce-basic / model /weight_activation.py
Tin Theethawat Savastham
♻️ Split Function for Implement and Model Directory
4ec8622
Raw
History Blame Contribute Delete
163 Bytes
import numpy as np
alpha = 0
def un_zero_weight(x):
shape = x.shape
x = x.flatten()
result = np.where(x < 0, 0, x)
return result.reshape(shape)