Skip to content

Error TensorflowModelTrain with path of dimension 48 instead of 16 #88

@viennois

Description

@viennois

HI,
I extract patches of dimension 48 instead of 16
Here, my line of code :
"otbcli_PatchesExtraction -source1.il Mosa_8B_Projet_Pheno_24022022_hillshade.tif -source1.patchsizex 48 -source1.patchsizey 48 -source1.out train_mosafinale17classes_Patches48.tif -vec Training_17classes02032022.shp -field "Num_class" -outlabels train_mosafinale17classes_Labels48.tif uint8".

And when I run otbcli_TensorflowModelTrain \ with -training.source1.patchsizex 48
-training.source1.patchsizey 48
I have this error message :

"wModelTrain: itk::ERROR: TensorflowMultisourceModelTrain(0x564fdea48c70): Can't run the tensorflow session !
Tensorflow error message:
Invalid argument: logits and labels must have the same first dimension, got logits shape [8100,18] and labels shape [100]
[[{{node sparse_softmax_cross_entropy_loss/xentropy/xentropy}}]]
OTB Filter debug message:
Output image buffered region: ImageRegion (0x7ffe967afb80)
Dimension: 2
Index: [0, 0]
Size: [1, 1]

Input #0:
Requested region: ImageRegion (0x7ffe967afbb0)
Dimension: 2
Index: [0, 0]
Size: [48, 4270176]

Tensor shape ("x": {100, 48, 48, 11}
Input #1:
Requested region: ImageRegion (0x7ffe967afbb0)
Dimension: 2
Index: [0, 0]
Size: [1, 88962]

Tensor shape ("y": {100, 1, 1, 1}

So my question : Do I have any parameters to modify in the python script?

Thanks for your help

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomersquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions