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]) ) )