Van_Gil:

My network produces a binary classification (patient is healthy, patient is sick). The input layer is fed 12 numeric values. I created and trained a neural network in Collab, it trained well and shows acceptable results on the validation sample (val_accuracy: 0.95
val_loss: 0.13), but after converting the model to .tflite and running it on a smartphone, it can’t predict anything.


Hello @Van_Gil Prior to deploying the model, have you considered the following by any chance to improve generalization?


Post-training quantization (Post-training quantization  |  TensorFlow Lite 2):

For example, float16 quantization can lead to a “minimal loss in accuracy”.
Another example: integer-only “16x8” quantization (experimental), which “can improve accuracy significantly, but only slightly increase model size”.



Some basic things to try to reduce overfitting and improve generalization (Overfit and underfit  |  TensorFlow Core):

More training data; “quality” data/data quality, etc.
Weight regularization, dropout, and various other techniques, which are active areas in ML research.
In “imbalanced datasets” …" overfitting is a significant concern from the lack of training data" (Classification on imbalanced data  |  TensorFlow Core).



Or, perhaps, the issue here is with the Java code.
A few more sources:
  
      

      Google Developers
  

  
    

On-Device Machine Learning  |  Google Developers 3

  Run machine learning models in your Android, iOS, and Web app. Low latency. Keep data on-device. Works offline.


  

  
    
    
  

  


  
      

      TensorFlow
  

  
    

TensorFlow Lite | ML for Mobile and Edge Devices 2

  A deep learning framework for on-device inference. Train and deploy machine learning models on mobile and IoT devices, Android, iOS, Edge TPU, Raspberry Pi.