MCPcopy Index your code
hub / github.com/tensorflow/tfjs / _createTensorFlowSavedModel

Function _createTensorFlowSavedModel

tfjs-converter/python/test_pip_package.py:111–125  ·  view source on GitHub ↗

Create a TensorFlow SavedModel for testing. Args: save_path: The directory path in which to save the model.

(save_path)

Source from the content-addressed store, hash-verified

109 builder.save()
110
111def _createTensorFlowSavedModel(save_path):
112 """Create a TensorFlow SavedModel for testing.
113
114 Args:
115 save_path: The directory path in which to save the model.
116 """
117
118 input_data = constant_op.constant(1., shape=[1])
119 root = autotrackable.AutoTrackable()
120 root.v1 = variables.Variable(3.)
121 root.v2 = variables.Variable(2.)
122 root.f = def_function.function(lambda x: root.v1 * root.v2 * x)
123 to_save = root.f.get_concrete_function(input_data)
124
125 save(root, save_path, to_save)
126
127
128def _create_hub_module(save_path):

Callers 1

setUpClassMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…