NEGU93 / cvnn

Library to help implement a complex-valued neural network (cvnn) using tensorflow as back-end
https://complex-valued-neural-networks.readthedocs.io/
MIT License
164 stars 34 forks source link

using this function layers.complex_input(shape=input_shape + (3,)) gives off dtype error #42

Closed CaffineAddic closed 1 year ago

CaffineAddic commented 1 year ago

File /tmp/__autograph_generated_fileidpjfdij.py:205, in outer_factory..inner_factory..tf__call(self, inputs) ... TypeError: Value passed to parameter 'features' has DataType complex64 not in list of allowed values: float32, float64, int32, uint8, int16, int8, int64, bfloat16, uint16, float16, uint32, uint64, qint8

Call arguments received by layer "complex_conv2d_9" (type ComplexConv2D): • inputs=tf.Tensor(shape=(None, 12, 12, 512), dtype=complex64)

But using layers.ComplexInput does not but in unet layer it gives off an error

TypeError: Inputs to a layer should be tensors. Got '' (of type ) as input for layer 'complex_conv2d_10'.

Please help

CaffineAddic commented 1 year ago

It was due to the activation function being relu instead of 'cart_relu'

CaffineAddic commented 1 year ago

Solved it, thank you