Every line of 'tf convert to tensor' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
171 @converter_func(TYPES.ExpandDims) 172 def convert_tf_expand_dims(scope, operator, container): 173 oopb = OnnxOperatorBuilder(container, scope) 174 node = operator.raw_operator 175 axis = _cal_tensor_value(node.inputs[1]).tolist() 176 rank = len(_cal_tensor_shape(node.inputs[0])) 177 oopb.apply_op_with_output("apply_unsqueeze", 178 [operator.inputs[0].full_name], 179 operator.output_full_names, 180 name=operator.full_name, 181 axis=axis, 182 rank=rank)