Open Symbadian opened 3 years ago
Hey Li,
I solved it pal, change the following in your code it is causing some issues on the 3dcnn.py file in the model section! I am running spyder 5.0.0 whilst researching I found the solution here at the very bottom: https://stackoverflow.com/questions/49079115/valueerror-negative-dimension-size-caused-by-subtracting-2-from-1-for-max-pool
Change the max pooling to this and edit all of the section in the model with the padding to padding='same': """ model.add(MaxPooling3D(pool_size=(3, 3, 3), padding='same'))''''
apparently, the images are gradually getting smaller making it challenging for the convolution processing to occur! let me know when you made the amendments I will select the start ratings!
Hey MatParr, I am sorry that this project is not fully understood by me because it fixes from another project. In this period, I am ready for a recruit. When it finished after this month, I will work with you on this project.
No worries mate, I solve it the padding was causing the issues check the errors I posted to the forum, it can save someone else some time! I am not sure the padding method you deployed is still in effect or was upgraded! That’s the thing, when the model is functional and packages upgrade they cause all Sorts of issues!
I am observing the metrics from this model today! Thanx once more!
Cheers!
From: liupeng678 @.> Date: Friday, 16 April 2021 at 06:49 To: liupeng678/3DCNN-with-keras @.> Cc: MatParr @.>, Author @.> Subject: Re: [liupeng678/3DCNN-with-keras] Errors With The Model 2dcnn and 3dcnn (#3)
Hey MatParr, I am sorry that this project is not fully understood by me because it fixes from another project. In this period, I am ready for a recruit. When it finished after this month, I will work with you on this project.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/liupeng678/3DCNN-with-keras/issues/3#issuecomment-820924884, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AL7WSHK46ULHJV66CSXABJ3TI7FWBANCNFSM427CVUOQ.
Ohh by the way I do come across more stuff I will let you know okay!
I will be experimenting today and breaking stuff and fixing stuff to test is functionality! I see you didn’t implement stratify nor scaling for normalisations via the testing, any reason? Is it that the more is computationally heavy or you are unaware of it? I am trying to understand your pattern of though here!
Also is there any specific reason for you choosing the hold out method “train test split” and not kfold for higher accuracy’s?
Cheer to positive perspectives!
Matt.
From: mm gp @.> Sent: Friday, April 16, 2021 7:03:07 AM To: liupeng678/3DCNN-with-keras @.>; liupeng678/3DCNN-with-keras @.> Cc: Author @.> Subject: Re: [liupeng678/3DCNN-with-keras] Errors With The Model 2dcnn and 3dcnn (#3)
No worries mate, I solve it the padding was causing the issues check the errors I posted to the forum, it can save someone else some time!
I am not sure the padding method you deployed is still in effect or was upgraded! That’s the thing, when the model is functional and packages upgrade they cause all
Sorts of issues!
I am observing the metrics from this model today! Thanx once more!
Cheers!
From: liupeng678 @.> Date: Friday, 16 April 2021 at 06:49 To: liupeng678/3DCNN-with-keras @.> Cc: MatParr @.>, Author @.> Subject: Re: [liupeng678/3DCNN-with-keras] Errors With The Model 2dcnn and 3dcnn (#3)
Hey MatParr, I am sorry that this project is not fully understood by me because it fixes from another project. In this period, I am ready for a recruit. When it finished after this month, I will work with you on this project.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/liupeng678/3DCNN-with-keras/issues/3#issuecomment-820924884, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AL7WSHK46ULHJV66CSXABJ3TI7FWBANCNFSM427CVUOQ.
Hi Liupeng,
I tried reaching out to you via your email but no luck in catching your attention!!
I have been receiving these errors for which I cannot seem to evade as this is challenging my understanding!
I really would like to solve this as your code is very interesting! Can you help me solve this, please?
I googled and saw this response but when I tried implementing this, it is still futile! https://stackoverflow.com/questions/45645276/negative-dimension-size-caused-by-subtracting-3-from-1-for-conv2d-2-convolution
WHAT I TRIED: ''' expects the input to be in the format (samples, rows, cols, channels), which is "channels-last". Your data seems to be in the format (samples, channels, rows, cols). You should be able to fix this using the optional keyword data_format = 'channels_first' when declaring the Convolution2D layer
model.add(Convolution2D(32, (3, 3), activation='relu', input_shape=(1,28,28), data_format='channels_first'))
They also mention removing some of the convolution layers but I think in my limited knowledge that this will have an adverse effect on the accuracy and metrics!???!?! I could be wrong here! Please assist? Something seems off with the Max Pooling Layer '''
My ERRORS: ValueError: Negative dimension size caused by subtracting 3 from 1 for '{{node conv3d_2/Conv3D}} = Conv3D[T=DT_FLOAT, data_format="NDHWC", dilations=[1, 1, 1, 1, 1], padding="VALID", strides=[1, 1, 1, 1, 1]](Placeholder, conv3d_2/Conv3D/ReadVariableOp)' with input shapes: [?,9,9,1,32], [3,3,3,32,64].