Skip to content
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

Reassigning signal returns error #83

Open
curryrasul opened this issue Jul 26, 2024 · 0 comments
Open

Reassigning signal returns error #83

curryrasul opened this issue Jul 26, 2024 · 0 comments

Comments

@curryrasul
Copy link
Collaborator

curryrasul commented Jul 26, 2024

This doesn't work without doing + 0 for out signal

pragma circom 2.0.0;

// Flatten layer with that accepts a 2D input
template Flatten2D (nRows, nCols, nChannels) {
    signal input in[nRows][nCols][nChannels];
    signal output out[nRows*nCols*nChannels];

    var idx = 0;

    for (var i=0; i<nRows; i++) {
        for (var j=0; j<nCols; j++) {
            for (var k=0; k<nChannels; k++) {
                // TODO: remove a need to create a gate
                out[idx] <== in[i][j][k] + 0;
                idx++;
            }
        }
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant