Closed poig closed 1 year ago
It is a bug. Unlikely it would be fixed as this loss function is deprecated as of version 0.4.
It is due to shape error. It may be between a hashable 1D and unhashable 2D numpy array.
The sigmoid cross entropy loss has been removed in QML v0.6.
Environment
What is happening?
I try to apply "cross_entropy_sigmoid" with NeuralNetworkClassifier but giving an unexpected bug, not sure what goes wrong, I tried other methods also doesn't work, like disable the one_hot, but other error pops up.
How can we reproduce the issue?
output:
What should happen?
it shouldn't return numpy.ndarray after somwhere(maybe
BinaryObjectiveFunction.objective
), so it can pass through the check https://github.com/Qiskit/qiskit-machine-learning/blob/3d954de916be8f7d4854f3c4369281112f9b0fdb/qiskit_machine_learning/utils/loss_functions/loss_functions.py#L193-L196 without TypeError: unhashable type: 'numpy.ndarray'Any suggestions?
Add more test for this.