I see. From what you have written it seems you have used a Python specific layer that does not exist in TensorFlow.js. I would recommend building this directly in TensorFlow.js to avoid conversion issues like this. TensorFlow.js allows you to build and train new models too both in Node.js for server side if you want to train with your existing server infrastructure, and also on client side in browser too! This is exactly how teachable machine’s pose detection works infact:

  
      

      teachablemachine.withgoogle.com
  

  
    

Teachable Machine 5

  Train a computer to recognize your own images, sounds, & poses.
        A fast, easy way to create machine learning models for your sites, apps, and more – no expertise or coding required.


  

  
    
    
  

  


If you want to learn how to do what teachable machine does but in JavaScript you can check out this tutorial that shows how to take output from existing model and then add your own layers on top to then train to learn something new:

  
      

      Google Codelabs
  

  
    

TensorFlow.js Transfer Learning Image Classifier  |  Google Codelabs 3

  In this codelab, you will learn how to build a “Teachable machine”, a custom image classifier that you will train on the fly in the browser using TensorFlow.js.


  

  
    
    
  

  


While this lab is for images, you could adapt to use output of pose instead and then add your custom network on the end as you desire.
I also have a Glitch that shows how to fetch arbitrary layers of a TensorFlow.js model here:

  
      

      glitch.com
  

  
    

Glitch 3

  Combining automated deployment, instant hosting & collaborative editing, Glitch gets you straight to coding so you can build full-stack web apps, fast


  

  
    
    
  

  


So with all of those you should be able to pull what you want off directly in JS (or Node.js) both of which use the TensorFlow.js APIs.