Become a leader in the IoT community!
Join our community of embedded and IoT practitioners to contribute experience, learn new skills and collaborate with other developers with complementary skillsets.
Join our community of embedded and IoT practitioners to contribute experience, learn new skills and collaborate with other developers with complementary skillsets.
Hello guys am workin on Disease Detection from X-Ray Scans Using TinyML, i have gathered a diverse dataset of X-ray images from public medical databases, used images labeled with specific diseases or conditions, such as pneumonia, tuberculosis, or normal/healthy cases, i have also prepared my training script but keep getting an error while training the model
`Traceback (most recent call last):
File “
File “tensorflow/lite/python/interpreter.py”, line 42, in set_tensor
self._interpreter.SetTensor(self._tensor_index_map[tensor_index], value)
ValueError: Cannot set tensor: Dimension mismatch. Got [1, 128, 128, 3], expected [1, 64, 64, 1]
`
here’s my code
import tensorflow as tf
from tensorflow.keras import layers, models
model = models.Sequential([
layers.Conv2D(16, (3, 3), activation='relu', input_shape=(64, 64, 1)),
layers.MaxPooling2D((2, 2), name="pool_1"),
layers.Conv2D(32, (3, 3), activation='relu', name="conv_2"),
layers.MaxPooling2D((2, 2), name="pool_2"),
layers.Flatten(name="flatten"),
layers.Dense(64, activation='relu', name="dense_1"),
layers.Dense(3, activation='softmax', name="output_layer")
])
CONTRIBUTE TO THIS THREAD