We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following code reports zero FLOPs which is incorrect.
import model_profiler import tensorflow as tf input_image = tf.keras.layers.Input(shape=(256, 256, 1)) rgb_layer = tf.keras.layers.concatenate([input_image, input_image, input_image]) * 255.0 ots = tf.keras.applications.ConvNeXtSmall(include_top=False, input_shape = (256, 256, 3), include_preprocessing=True, weights = init_weights) fv = ots(rgb_layer) f = tf.keras.layers.GlobalAveragePooling2D()(fv) y_pred = tf.keras.layers.Dense(1, activation='sigmoid', name='output_class')(f) model = tf.keras.models.Model(input_image, y_pred) r = model_profiler.model_profiler(model, 1, use_units = ['GPU IDs', 'MFLOPs', 'GB', 'Million', 'MB']) print(r)
The above code prints:
| Model Profile | Value | Unit | |----------------------------------|------------|---------| | Selected GPUs | ['0', '1'] | GPU IDs | | No. of FLOPs | 0.0 | MFLOPs | | GPU Memory Requirement | 0.048 | GB | | Model Parameters | 49.4555 | Million | | Memory Required by Model Weights | 188.6576 | MB |
which is incorrect for the No. of FLOPs row.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The following code reports zero FLOPs which is incorrect.
The above code prints:
which is incorrect for the No. of FLOPs row.
The text was updated successfully, but these errors were encountered: