class_docstr: TorchModel wraps a PyTorch model as a single layer, thus the PyTorch model can be used for
  distributed inference or training.
class_docstr_tok: ["TorchModel","wraps","a","PyTorch","model","as","a","single","layer",",","thus","the","PyTorch","model","can","be","used","for","distributed","inference","or","training","."]
code: def from_value(model_value):
      model_bytes = callZooFunc(
          "float", "getTorchModelBytes", model_value
      )
      net = TorchModel(model_value, model_bytes)
      return net
  
file_path: analytics-zoo/pyzoo/zoo/pipeline/api/torch/torch_model.py
imports: import sys
  import io
  import torch
  from bigdl.nn.layer import Layer
  from bigdl.util.common import JTensor
  from zoo.common.utils import callZooFunc
  from zoo.pipeline.api.torch.utils import trainable_param
  from zoo.pipeline.api.torch import zoo_pickle_module
  from importlib.util import find_spec
label_desc: Use image node_id 2 for calling the TorchModel obj's underlying member method code with example usage: obj.from_value(model_value) and returns: net