Comparisons between string and double are not supported.
36 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
주영 이
el 4 de Dic. de 2021
Comentada: 주영 이
el 6 de Dic. de 2021
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/823215/image.jpeg)
error: nnet.cnn.TrainingOptionsADAM
The value of 'ValidationData' is not valid. The datastore has an invalid transform function defined.
cause: Comparisons between string and double are not supported.
What should I change to fix this error?
4 comentarios
Walter Roberson
el 4 de Dic. de 2021
Editada: Walter Roberson
el 4 de Dic. de 2021
Please show us the code for preprocessData()
Also, please show us the value of nettotrain at the time that the assignment to preprocessdValidationData is made.
Respuesta aceptada
Abolfazl Chaman Motlagh
el 5 de Dic. de 2021
in your code nettotrain is eather "YOLOv2" or "SSD", but in training process and preprocessData function and some other lines you check if it is 1 or 2. (that's why you get Comparisons between string and double are not supported)
if nettotrain == 1 %line 101
...
if nettotrain == 1 %line 115
...
if nettotrain == 2 %line 151
for this issue use strcmp (or just change nettotrain to 1 or 2 before all this problems).
for example:
if strcmp(nettotrain,"YOLOv2")
Más respuestas (0)
Ver también
Categorías
Más información sobre Recognition, Object Detection, and Semantic Segmentation en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!