-
Notifications
You must be signed in to change notification settings - Fork 12
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
AssertionError: Target dimensionality must be (out_channels, ?,(input_height - filter_height + 2 * padding_height) / stride_height + 1,(input_width - filter_width + 2 * padding_width) / stride_width + 1 #5
Comments
When I changed the shape of output channels, i got this error. |
In the two_conv.py code the variable conv_size is a kernel size tuple, so when you multiply it by n_filters it produces an error. before you define the network certain variables are defined, including total_conv_size = int(np.prod(conv_size)), which is the product of the conv_size dimensions. Try to change n=n_filters * conv_size * conv_size by n=n_filters * total_conv_size |
Hi, the problem now cames in how the internal code of |
Yeah you are right.I checked all these but got same error. |
Hi @tehreemnaqvi It seems like your error might be due to the addition of mini-batches in bindsnet. Unfortunately, we do not maintain the experiments repo. It is just a place to keep all our experiments. Could you log those variables in BindsNET and see what is going wrong? |
The main reason is because of con_ layer and con_layer2, shape = (1, n_ filters, *con_ Size) there is a problem. The shape is generally three-dimensional (C, h, w), so delete 1, and finally shape = (n_ filters, *con_ size) |
Hi,
I am following your examples.I wanted to use convolutional layers in SNN. So, I followed your examples,which you have done for mnist.Currently, I am working on (two_conv.py) this code.
But i have some issue,when i run this code,got this error.
AssertionError: Target dimensionality must be (out_channels, ?,(input_height - filter_height + 2 * padding_height) / stride_height + 1,(input_width - filter_width + 2 * padding_width) / stride_width + 1
Although i changed this conv_layer_ = DiehlAndCookNodes(
n=n_filters * total_conv_size, shape=(1, n_filters, *conv_size), refrac=0, traces=True, theta_decay=5e-1
)
by
conv_layer_ = DiehlAndCookNodes(
n=n_filters * total_conv_size, shape=(n_filters, conv_size,conv_size), refrac=0, traces=True, theta_decay=5e-1
)
But i got error that non-int tuples can't be multiply.
Please tell how can i fix this issue.
Thanks
The text was updated successfully, but these errors were encountered: