Closed vvolhejn closed 2 years ago
Hi @vvolhejn this error is occurring because you are using a keras model (tf.keras.Sequential
) with our pytorch manager (from sparseml.pytorch.optim import ScheduledModifierManager
).
We do have some support for sparsification with keras (see example notebook here), however the best supported path would be to port the model to pytorch and use the pytorch SchedueldModifierManager
(see example notebook here).
Hope this helps, let me know if you have any more questions!
Hi, I'm trying to learn how to use the library. I tried to follow the guide for Keras and wrote the following code:
which crashes with
I know I probably shouldn't be calling the function with
optimizer=None
but this is unrelated, since passing a PyTorch Sequential model works (and then crashes later becauseoptimizer=None
).The recipe is a slightly modified version of the example from the docs:
Environment Include all relevant environment information:
f7245c8
]: 0.12.2{'vendor': 'GenuineIntel', 'isa': 'avx512', 'vnni': False, 'num_sockets': 1, 'available_sockets': 1, 'cores_per_socket': 1, 'available_cores_per_socket': 1, 'threads_per_core': 2, 'available_threads_per_core': 2, 'L1_instruction_cache_size': 32768, 'L1_data_cache_size': 32768, 'L2_cache_size': 1048576, 'L3_cache_size': 40370176}