The second repository seems to use Keras so I’m unsure how it would fit into the use case or deploying your PyTorch model.  Could you describe the use case a bit more and what the JSON encoding would be used for?