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

Method UnknownShapeOfRank

tensorflow/core/framework/shape_inference.cc:753–764  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

751}
752
753ShapeHandle InferenceContext::UnknownShapeOfRank(int64 rank) {
754 CHECK_LE(rank, kint32max) << "rank must be less than kint32max";
755 if (rank == kUnknownRank) {
756 return UnknownShape();
757 }
758 CHECK_GE(rank, 0) << "rank must not be negative";
759 std::vector<DimensionHandle> dims(rank);
760 for (int32 i = 0; i < rank; ++i) {
761 dims[i] = UnknownDim();
762 }
763 return MakeShape(dims);
764}
765
766ShapeHandle InferenceContext::Scalar() { return MakeShape({}); }
767

Callers 15

decode_video_op.ccFile · 0.80
ReduceSliceShapeFnFunction · 0.80
xrt_compile_ops.ccFile · 0.80
UnchangedRankFunction · 0.80
xla_ops.ccFile · 0.80
string_ops.ccFile · 0.80
lookup_ops.ccFile · 0.80
nn_ops.ccFile · 0.80
kv_variable_ops.ccFile · 0.80
batch_ops.ccFile · 0.80

Calls 2

MakeShapeFunction · 0.85
UnknownShapeFunction · 0.70

Tested by 1

TEST_FFunction · 0.64