From 9ba7af686aeee6d22e6660d1657d37afcaac9342 Mon Sep 17 00:00:00 2001 From: Hu Xu Date: Fri, 31 Jul 2020 22:27:58 -0700 Subject: [PATCH] [mmf][fix]Assertion message to match if condition Summary: Correction of assertion message on the first dimension . Reviewed By: apsdehal Differential Revision: D22860233 fbshipit-source-id: d8280d81a84ee23b51512f987302b4397318b0a5 --- mmf/common/sample.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmf/common/sample.py b/mmf/common/sample.py index ef4d09d26..26fd56264 100644 --- a/mmf/common/sample.py +++ b/mmf/common/sample.py @@ -307,7 +307,7 @@ def add_field(self, field, data): "have same size as existing tensor " "fields in SampleList. " "Passed size: {}, Required size: {}".format( - len(data), len(self[fields[0]]) + len(data), len(self[tensor_field]) ) )