google-research / google-research/morph-net

Regularizer Loss remains zero / BatchToSpaceND

Open
#175 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1k
Forks
151
PR merge metrics
No merged PRs in 30d

Description

Hello
thanks for this great respository!

I use the GammaFlopsRegularizer, but the regularization loss remains at 0.
Since I initially received the error message

> "OpRegularizerManager could not handle ops: ['ForwardPass/w2l_encoder/conv121/BatchToSpaceND (BatchToSpaceND)', 'ForwardPass/w2l_encoder/conv121/SpaceToBatchND (SpaceToBatchND)', 'ForwardPass/w2l_encoder/conv121/concat_1 (Identity)']"

, I set the following in /network_regularizers/flop_regularizer.py:
```
op_handler_dict.update({
'FusedBatchNorm': source_op_handler,
'FusedBatchNormV2': source_op_handler,
'FusedBatchNormV3': source_op_handler,
'BatchToSpaceND': leaf_op_handler.LeafOpHandler(),
'SpaceToBatchND': leaf_op_handler.LeafOpHandler(),
})
```
and also added BatchToSpaceND and SpaceToBatchND to the supported OPs in network_regularizers/cost_calculator.py.
I don't get any more error messages, but the regularization loss remains at zero. What can I do?

Thanks for your help !

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.