-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Labels
feature requestNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
Hello @NEGU93, thank you for making this library! I'm attempting to use the arguments "use_bias" and "kernel_constraint" within "ComplexDense" as so:
self.d1 = complex_layers.ComplexDense(dim, use_bias=False, kernel_constraint=ConstantWeights())
However, these arguments seem to have no effect -- there are still biases, and the constraints on the weights are not enforced. That is, the layer performs identically to this:
self.d1 = complex_layers.ComplexDense(dim)
I tried the same arguments with tf.keras.layers.Dense and got the desired behaviors. Please let me know if I misunderstand how to use these. Thanks in advance!
Here's the relevant context, in case it helps:
class ConstantWeights(tf.keras.constraints.Constraint):
def __call__(self, w):
tf.keras.backend.set_value(w[0, 0], 3)
tf.keras.backend.set_value(w[1, 2], 3)
return w
class MyModel(Model):
def __init__(self):
super(MyModel, self).__init__()
self.d1 = complex_layers.ComplexDense(dim, use_bias=False, kernel_constraint=ConstantWeights())
def call(self, x):
x = self.d1(x)
return x
model = MyModel()
Metadata
Metadata
Assignees
Labels
feature requestNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed