sfraczek commented on a change in pull request #20393:
URL: https://github.com/apache/incubator-mxnet/pull/20393#discussion_r659679101
##########
File path: tests/python/mkl/subgraphs/test_fc_subgraph.py
##########
@@ -59,18 +59,19 @@ def forward(self, x):
@pytest.mark.parametrize('use_bias', [True, False])
@pytest.mark.parametrize('flatten', [True, False])
@pytest.mark.parametrize('alg', fc_post_ops_list)
[email protected]("Operator square, square_root, abs, exp cannot be found in
numpy mode")
def test_fc_eltwise(data_shape, use_bias, flatten, alg):
# fc + eltwise fusion case
class FCEltwise(nn.HybridBlock):
def __init__(self, use_bias, flatten, alg, **kwargs):
super(FCEltwise, self).__init__(**kwargs)
self.fc = nn.Dense(units=64, use_bias=use_bias, flatten=flatten,
- weight_initializer=CustomNormalInit(mean=0.5,
sigma=0.1) if alg == 'square_root' else None)
+ weight_initializer=CustomNormalInit(mean=0.5,
sigma=0.1, bounded=True) if alg == 'square_root' else None)
#avoid calculating square root of
negative values
self.alg = alg
def forward(self, x):
+ if self.alg == 'square_root':
Review comment:
Only that square_root returns nans for negative numbers
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]