Thanks to visit codestin.com
Credit goes to github.com

Skip to content

dmenig/nutrition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quick parity/export guide

  1. Train locally

    • Run your training as usual. It should produce:
      • models/recurrent_model.pth
      • models/best_params.json
  2. Export NumPy weights

    • Requires torch CPU in a Python 3.10–3.12 env.

    • Command: python3 export_npz_from_pth.py --pth models/recurrent_model.pth --out models

    • This generates models/recurrent_model_np.npz and bumps its mtime to be newer than the .pth.

  3. Parity check (optional, recommended)

    • Command: python3 compare_backends.py

    • Expect near-zero diffs for base_metabolism_kcal and W_adj_pred.

  4. Deploy on Render

    • Upload these three files to /app/models/ in the container:

      • recurrent_model_pth
      • recurrent_model_np.npz
      • best_params.json
    • The API will prefer NumPy if the .npz exists and is as new as (or newer than) the .pth.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages