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

3D MRI Image #224

Open
StephDocTUM opened this issue May 11, 2020 · 0 comments
Open

3D MRI Image #224

StephDocTUM opened this issue May 11, 2020 · 0 comments

Comments

@StephDocTUM
Copy link

StephDocTUM commented May 11, 2020

Hi,

I want to use keras-vis for a 3D mri image with the following model:

`def standart_model(tiefe, breite, länge,color_depth = 1):
model = Sequential()
model.add(Conv3D(8,(3, 3, 3), activation='relu', padding='same', name='conv1', strides=(1, 1, 1), input_shape=(tiefe, breite, länge, color_depth),data_format="channels_last"))
model.add(MaxPool3D(pool_size=(3, 2, 2), strides=(1, 2, 2), padding='valid', name='pool1'))
model.add(Conv3D(4, (3, 3, 3), activation='relu', padding='same', name='conv2', strides=(1, 1, 1)))
model.add(MaxPool3D(pool_size=(2, 2, 2), strides=(2, 2, 2), padding='valid', name='pool2'))
model.add(Flatten())

model.add(Dense(1, activation='relu', name='fc7'))

model.compile(loss='mean_squared_error', optimizer='rmsprop')
return model`

But I always receive the following error:

ValueError: slice index 8 of dimension 4 out of bounds. for 'strided_slice_54' (op: 'StridedSlice') with input shapes: [?,176,256,256,8], [3], [3], [3] and with computed input tensors: input[1] = <0 0 8>, input[2] = <0 0 9>, input[3] = <1 1 1>.

Did anyone make it work with a 3D image?

Best,
Stephan

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