Giter Club home page Giter Club logo

Comments (5)

NEGU93 avatar NEGU93 commented on June 9, 2024

Can you provide the code you used?
Did you use the complex_input or ComplexInput layer?

from cvnn.

mhsacampos avatar mhsacampos commented on June 9, 2024

Below is the code :

init = tf.keras.initializers.GlorotUniform(seed=117)
model = Sequential()
model.add(complex_layers.ComplexInput(input_shape=input_shape, name='main_input'))
model.add(complex_layers.ComplexConv1D(30, (3), activation='cart_relu'))
model.add(complex_layers.ComplexFlatten())
model.add(complex_layers.ComplexDense(64, activation='cart_relu', kernel_initializer=init))
model.add(complex_layers.ComplexDense(7, kernel_initializer=init))

but the code doesn't go beyond the ComplexConv1D layer

from cvnn.

NEGU93 avatar NEGU93 commented on June 9, 2024

I tried your code and worked, here is the code.

What version are you using? Try updating your version of the code.

Or maybe it is breaking somewhere else for what I would need more of the code.

from cvnn.

mhsacampos avatar mhsacampos commented on June 9, 2024

Dear, Barrachina, thank you so much.
By means of your kind reply I discovered that the error happens when the input "kernel_initializer=init" is included in the ComplexConv1D as an argument. The kernel initialization with a complex value maybe can cause that. I'm not sure about

By the way, have you created the ComplexMaxPooling1D ? Or have you any idea how to create such layer from the 2D case?

from cvnn.

NEGU93 avatar NEGU93 commented on June 9, 2024

Yes indeed, initializations are done like this:

        if self.my_dtype.is_complex:
            self.w_r = tf.Variable(
                name='kernel_r',
                initial_value=self.kernel_initializer(shape=(input_shape[-1], self.units), dtype=self.my_dtype),
                trainable=True
            )
            self.w_i = tf.Variable(
                name='kernel_i',
                initial_value=self.kernel_initializer(shape=(input_shape[-1], self.units), dtype=self.my_dtype),
                trainable=True
            )

So as you can see, they are used as real-valued. Now the error message makes sense (and why it was expecting a float and not a complex). I did it like this because Tensorflow does not like me to have complex weights and throws an error.
I implemented 4 initializations.
You can do your own if you wish, here is the link to my implementations.

For the 1DPooling, I would like it if you can create a new issue so I can close this topic. I can already tell you they are not implemented but if you create a new issue I can label it as a feature request and see to it someday (hopefully this weekend).

from cvnn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.