We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 008ce56 commit 66707f3Copy full SHA for 66707f3
tensorflow/contrib/lite/model.cc
@@ -240,6 +240,11 @@ TfLiteStatus InterpreterBuilder::BuildLocalIndexToRegistrationMapping() {
240
namespace {
241
template <class T>
242
std::vector<int> FlatBufferIntArrayToVector(T* flat_array) {
243
+ // Initialize shape of tensors with null shape. Empty vectors are converted
244
+ // to nullptr for models that are constructed via flatbuffers::Pack.
245
+ if (flat_array == nullptr) {
246
+ return {};
247
+ }
248
std::vector<int> ret(flat_array->Length());
249
for (int i = 0; i < flat_array->Length(); i++) {
250
ret[i] = flat_array->Get(i);
0 commit comments