tensorflow/python/framework/op_def_library_pybind.cc
// This module provides a subset of the functionality from op_def_library.py
// and relies on op_def_library_test.py for test coverage.
This module provides a subset of the functionality from op_def_library.py
and relies on op_def_library_test.py for test coverage.
This module provides a subset of the functionality from op_def_library . py and relies on op_def_library_test . py for test coverage .
PYBIND11_MODULE(_op_def_library_pybind, m) {
  m.def("process_inputs", [](std::string& op_type_name, int producer_version,
                             py::dict& keywords) {
    const OpDef* op_def = GetOpDef(op_type_name, producer_version);
    MaybeRaiseFromStatus(CheckOpDeprecation(*op_def, producer_version));
    DefaultAttrMap default_type_attr_map;
    AllowedAttrMap allowed_list_attr_map;
    AttrProtosMap attr_protos_map;
    py::dict attrs, attr_protos;
    py::list inputs, input_types, output_structure;
    ExtractDefaultTypesAndAllowedTypes(*op_def, default_type_attr_map,
                                       allowed_list_attr_map);
    ExtractInputsAndAttrs(op_type_name, *op_def, allowed_list_attr_map,
                          keywords, attrs, inputs, input_types);
    ExtractRemainingAttrs(op_type_name, *op_def, keywords,
                          default_type_attr_map, attrs);
    ExtractAttrProto(op_type_name, *op_def, attrs, attr_protos,
                     attr_protos_map);
    ExtractOutputStructure(op_type_name, *op_def, attr_protos, attr_protos_map,
                           output_structure);
    CheckAllInputsUsed(op_type_name, keywords);
    return py::make_tuple(attr_protos, inputs, input_types, output_structure);
  });
}
PYBIND11_MODULE ( _op_def_library_pybind , m ) { m . def ( " " , [ ] ( std :: string & op_type_name , int producer_version , py :: dict & keywords ) { const OpDef * op_def = GetOpDef ( op_type_name , producer_version ) ; MaybeRaiseFromStatus ( CheckOpDeprecation ( * op_def , producer_version ) ) ; DefaultAttrMap default_type_attr_map ; AllowedAttrMap allowed_list_attr_map ; AttrProtosMap attr_protos_map ; py :: dict attrs , attr_protos ; py :: list inputs , input_types , output_structure ; ExtractDefaultTypesAndAllowedTypes ( * op_def , default_type_attr_map , allowed_list_attr_map ) ; ExtractInputsAndAttrs ( op_type_name , * op_def , allowed_list_attr_map , keywords , attrs , inputs , input_types ) ; ExtractRemainingAttrs ( op_type_name , * op_def , keywords , default_type_attr_map , attrs ) ; ExtractAttrProto ( op_type_name , * op_def , attrs , attr_protos , attr_protos_map ) ; ExtractOutputStructure ( op_type_name , * op_def , attr_protos , attr_protos_map , output_structure ) ; CheckAllInputsUsed ( op_type_name , keywords ) ; return py :: make_tuple ( attr_protos , inputs , input_types , output_structure ) ; } ) ; }
This module provides a subset of the functionality from op_def_library.py
and relies on op_def_library_test.py for test coverage.
This module provides a subset of the functionality from op_def_library . py and relies on op_def_library_test . py for test coverage .
// Method assumes all inputs in `keywords` are of type tf.Tensor.