Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

How to train a model with one input and multi-output? #487

Open
amir-sanaat opened this issue Sep 18, 2020 · 0 comments
Open

How to train a model with one input and multi-output? #487

amir-sanaat opened this issue Sep 18, 2020 · 0 comments

Comments

@amir-sanaat
Copy link

Dear Niftynet User,
I plan to train a model with one input and three (or more) outputs. Just consider a 2D image as input and three 2D images as output.
when I tried it with Niftynet I faced with the following error:

�[1mINFO:niftynet:�[0m initialised uniform sampler {'image': (1, 96, 112, 1, 1, 2), 'image_location': (1, 7), 'output': (1, 96, 112, 1, 1, 2), 'output_location': (1, 7)}
�[1mWARNING:niftynet:�[0m sampler queue_length should be larger than batch_size, defaulting to batch_size * 5.0 (25).
�[1mINFO:niftynet:�[0m initialised uniform sampler {'image': (1, 96, 112, 1, 1, 2), 'image_location': (1, 7), 'output': (1, 96, 112, 1, 1, 2), 'output_location': (1, 7)}

"ValueError: Cannot reshape a tensor with 10752 elements to shape [21504] (21504 elements) for 'worker_0/loss_function/map/while/Reshape' (op: 'Reshape') with input shapes: [96,112,1], [1] and with input tensors computed as partial shapes: input[1] = [21504]."

Does anyone have any idea for solving this issue?

Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant