Spaces:
Runtime error
Runtime error
Zekun Wu
commited on
Commit
·
9f3ad0b
1
Parent(s):
a368681
add
Browse files
app.py
CHANGED
@@ -40,7 +40,7 @@ def calculate_flops_hf(model_name, input_shape, access_token, bp_factor):
|
|
40 |
model = get_mode_from_hf(model_name=model_name, library="auto", access_token=access_token)
|
41 |
data, return_print = calculate_flops_in_hugging_space(model_name=model_name, empty_model=model,
|
42 |
access_token=access_token, input_shape=input_shape,
|
43 |
-
bp_factor=bp_factor
|
44 |
print(f"Data: {data}")
|
45 |
|
46 |
total_flops = data[0]['Forward+Backward FLOPs'] * 10 ** 9 # Convert GFLOPs to FLOPs
|
|
|
40 |
model = get_mode_from_hf(model_name=model_name, library="auto", access_token=access_token)
|
41 |
data, return_print = calculate_flops_in_hugging_space(model_name=model_name, empty_model=model,
|
42 |
access_token=access_token, input_shape=input_shape,
|
43 |
+
bp_factor=bp_factor)#, output_unit=output_unit)
|
44 |
print(f"Data: {data}")
|
45 |
|
46 |
total_flops = data[0]['Forward+Backward FLOPs'] * 10 ** 9 # Convert GFLOPs to FLOPs
|