-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Callable should be a list of existing layers in the pipeline only. #42
Comments
I want to work on this issue to solve it. Can you please assign me this issue ? |
Hi @amansingh2116, sure! Let me know if you need any help or intro to the problem. |
My idea : Instead of checking if the first element of each tuple is for layer, params in operations:
if not isinstance(layer, type) or not issubclass(layer, BaseLayer):
raise TypeError(f"Operation {layer} must inherit from BaseLayer.") Please review this and check if this would solve the issue or not, so I can create a PR. |
Could you please review and reply, so I would be assigned and can start working on the issue. |
Hi @amansingh2116, I am so sorry, I did not get notification for these messages. Please go ahead and create a PR. I will start reviewing your contributions as soon as possible. |
@SaashaJoshi please review my PR and suggest suitable changes. |
here it is #147 |
The error handling logic in
qcnn.py
(will be transferred toquantum_neural_network.py
after #36) that checks ifoperations[0][0]
is aCallable
should be specific in what callable functions/classes are allowed. For neural networks in general,sequence
expects operations that are inherited from theBaseLayer
class inbase_layer.py
.https://github.com/SaashaJoshi/quantum-image-processing/blob/828a9297f9fa1976f531b23c98ad05623c2a1390/quantum_image_processing/neural_networks/qcnn.py#L57-L60
Without a specification of a particular quantum layer callable, in-built functions like
print
,sum
, etc. pass the current tests.The text was updated successfully, but these errors were encountered: