-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
calflops version is: 0.3.2
code:
from calflops import calculate_flops
gru = nn.GRU(input_size=128, hidden_size=128, num_layers=1, batch_first=True)
input_tensor = torch.randn(10, 32, 128) # (seq_len, batch_size, input_size)
flops, macs, params = calculate_flops(gru, (10, 32, 128), output_as_string=True, print_results=True, print_detailed=True)
print(" calflops: flops:", flops, " param:", params, "macs:", macs)
############################################
test result:
GRU(99.07 K = 100% Params, 0 MACs = 0% MACs, 63.2 MFLOPS = 100% FLOPs, 128, 128, batch_first=True)
calflops: flops: 63.2 MFLOPS param: 99.07 K macs: 0 MACs
Metadata
Metadata
Assignees
Labels
No labels