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

Method SetArgs

tensorflow/core/framework/function.cc:974–990  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

972FunctionCallFrame::~FunctionCallFrame() {}
973
974Status FunctionCallFrame::SetArgs(gtl::ArraySlice<Tensor> args) {
975 // Input type checks.
976 if (args.size() != arg_types_.size()) {
977 return errors::InvalidArgument("Expects ", arg_types_.size(),
978 " arguments, but ", args.size(),
979 " is provided");
980 }
981 for (size_t i = 0; i < args.size(); ++i) {
982 if (arg_types_[i] != args[i].dtype()) {
983 return errors::InvalidArgument(
984 "Expects arg[", i, "] to be ", DataTypeString(arg_types_[i]), " but ",
985 DataTypeString(args[i].dtype()), " is provided");
986 }
987 args_[i] = args[i];
988 }
989 return Status::OK();
990}
991
992Status FunctionCallFrame::GetRetvals(std::vector<Tensor>* rets) const {
993 rets->clear();

Callers 8

TESTFunction · 0.80
RunMethod · 0.80
RunMethod · 0.80
RunRemoteMethod · 0.80
RunMethod · 0.80
RunFunctionMethod · 0.80
TEST_FFunction · 0.80

Calls 4

InvalidArgumentFunction · 0.85
DataTypeStringFunction · 0.70
sizeMethod · 0.45
dtypeMethod · 0.45

Tested by 5

TESTFunction · 0.64
RunMethod · 0.64
RunFunctionMethod · 0.64
TEST_FFunction · 0.64