MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TFE_OpSetAttrStringList

Function TFE_OpSetAttrStringList

tensorflow/c/eager/c_api.cc:758–767  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

756}
757
758void TFE_OpSetAttrStringList(TFE_Op* op, const char* attr_name,
759 const void* const* values, const size_t* lengths,
760 int num_values) {
761 std::vector<tensorflow::StringPiece> v(num_values);
762 for (int i = 0; i < num_values; ++i) {
763 v[i] = tensorflow::StringPiece(static_cast<const char*>(values[i]),
764 lengths[i]);
765 }
766 op->operation.MutableAttrs()->Set(attr_name, v);
767}
768
769void TFE_OpSetAttrFloatList(TFE_Op* op, const char* attr_name,
770 const float* values, int num_values) {

Calls 2

MutableAttrsMethod · 0.80
SetMethod · 0.45

Tested by

no test coverage detected