MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / add_row

Method add_row

python/paddle/hapi/static_flops.py:222–232  ·  view source on GitHub ↗
(self, row_str)

Source from the content-addressed store, hash-verified

220 self.table_len.append(len(head))
221
222 def add_row(self, row_str):
223 if not isinstance(row_str, list):
224 print('The row_str should be a list')
225 if len(row_str) != self.col_num:
226 print(
227 f'The length of row data should be equal the length of table heads, but the data: {len(row_str)} is not equal table heads {self.col_num}'
228 )
229 for i in range(self.col_num):
230 if len(str(row_str[i])) > self.table_len[i]:
231 self.table_len[i] = len(str(row_str[i]))
232 self.data.append(row_str)
233
234 def print_row(self, row):
235 string = ''

Callers 2

_graph_flopsFunction · 0.95
dynamic_flopsFunction · 0.95

Calls 4

rangeFunction · 0.85
strFunction · 0.85
printFunction · 0.50
appendMethod · 0.45

Tested by

no test coverage detected