message: Added support for packing of symbolic shapes
diff: @@ -770,6 +770,29 @@ class SymbolicShapeRefiner {
  c->output_tensors_as_shapes.resize(1);
  c->output_tensors_as_shapes[0] = result;
  }
  + } else if (IsPack(node)) {
  + // A Pack node concatenating scalars is often used to generate a shape.
  + std::vector<DimensionHandle> dims;
  + bool valid = true;
  + for (int i = 0; i < ic->num_inputs(); ++i) {
  + const Tensor* t = ic->input_tensor(i);
  + if (t) {
  + if (t->dims() != 0 ||
  + (t->dtype() != DT_INT32 && t->dtype() != DT_INT64)) {
  + valid = false;
  + break;
  + }
  + int64 size = t->dtype() == DT_INT32 ? t->scalar<int32>()()
  + : t->scalar<int64>()();
  + dims.push_back(size < 0 ? ic->UnknownDim() : ic->MakeDim(size));
  + } else {
  + dims.push_back(ic->UnknownDim());
  + }
  + }
  + if (valid) {
  + c->output_tensors_as_shapes.resize(1);
  + c->output_tensors_as_shapes[0] = ic->MakeShape(dims);
  + }
  } else if (IsSlice(node)) {
  ShapeHandle input = ic->input_tensors_as_shapes()[0];
  bool valid = ic->RankKnown(input);
  