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

ValueError: Unknown loss function:ComplexAverageCrossEntropy #24

Closed zeneggar closed 2 years ago

zeneggar commented 2 years ago

【Succeed】from cvnn.losses import ComplexAverageCrossEntropy 【When using lossfunction:】loss='ComplexAverageCrossEntrop()' 【Error happens】ValueError: Unknown loss function:ComplexAverageCrossEntropy

When I use another loss function (Complex Mean Square Error), the same error happens. Can you give me some advice to find the reason? If I post two times of this issure, please ignore one or delete. Thank you very much. Frank

zeneggar commented 2 years ago

Sorry that I just find the reason. loss='ComplexAverageCrossEntrop()' should be changed to loss=ComplexAverageCrossEntrop() And the issue is solved. Thanks. Frank

NEGU93 commented 2 years ago

Try removing the ' when initializing the class.

zeneggar commented 2 years ago

Thank you. It works.