@Jason  I tried loading the model using tf.loadLayersModel function but an error is occurring. I tried but I couldn’t find the solution.
This was the error:
Unhandled Rejection (Error): Unknown layer: SlicingOpLambda. This may be due to one of the following reasons:

The layer is defined in Python, in which case it needs to be ported to TensorFlow.js or your JavaScript code.
The custom layer is defined in JavaScript, but is not registered properly with tf.serialization.registerClass().