Open starsky68 opened 3 years ago
Hi @starsky68,
Can you please provide more context ? In particular:
self.weight
for ? It looks like it is never used in the layer.b
to be a class member ? You could then return it in get_prunable_weights(self)
Hi @starsky68,
Can you please provide more context ? In particular:
- What is
self.weight
for ? It looks like it is never used in the layer.- What prevents
b
to be a class member ? You could then return it inget_prunable_weights(self)
I modified the above sample code again. Self. Weight can be obtained through get prunable Weights returns, but I don't know if this 'b' is returned to get prunable Weights, hope to get help. Where ‘b' is an iteratively updated tensor
Hi @starsky68,
Can you please provide more context ? In particular:
- What is
self.weight
for ? It looks like it is never used in the layer.- What prevents
b
to be a class member ? You could then return it inget_prunable_weights(self)
When I use TF1, I can directly use its pruning interface apply_ mask operates on the tensor, but the current interface seems to have changed after TF2. Such operations are no longer supported
Prior to filing: check that this should be a bug instead of a feature request. Everything supported, including the compatible versions of TensorFlow, is listed in the overview page of each technique. For example, the overview page of quantization-aware training is here. An issue for anything not supported should be a feature request.
Describe the bug How to prune a custom tensor? The tensor is a custom variable and is initialized with tf.zeros.
System information
TensorFlow version (installed from source or binary):
TensorFlow Model Optimization version (installed from source or binary):
Python version: 3.8
Describe the expected behavior
Describe the current behavior
How to prune "b"
Code to reproduce the issue
Screenshots If applicable, add screenshots to help explain your problem.
Additional context