# Error using tensorMmul on permuted tensor

**URL:** <https://community.konduit.ai/t/error-using-tensormmul-on-permuted-tensor/675>\
**Category:** SameDiff\
**Created:** [July 1, 2020, 4:18pm UTC](https://community.konduit.ai/t/error-using-tensormmul-on-permuted-tensor/675 "2020-07-01T16:18:49Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![treo](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/treo/32/47_2.png) [@treo](https://community.konduit.ai/u/treo)\
**Post date:** [July 1, 2020, 7:34pm UTC](https://community.konduit.ai/t/error-using-tensormmul-on-permuted-tensor/675/4 "2020-07-01T19:34:26Z")

</div>

It is possible to work around it in a similar way to how the workaround in this case worked:

> [@How to use sd.nn.batchNorm(…) in Deeplearning4j?](https://community.konduit.ai/t/how-to-use-sd-nn-batchnorm-in-deeplearning4j/85/6):
>
> Here’s one possible workaround: class BatchNormFixed(sameDiff: SameDiff?, input: SDVariable?, mean: SDVariable?, variance: SDVariable?, gamma: SDVariable?, beta: SDVariable?, epsilon: Double, vararg axis: Int) : org.nd4j.linalg.api.ops.impl.layers.convolution.BatchNorm(sameDiff, input, mean, variance, gamma, beta, epsilon, axis) { override fun doDiff(f1: MutableList\<SDVariable\>?): MutableList\<SDVariable\> { var list = args().toMutableList() list.add(f1!!.get(0)) retur…

However, you’ve got to understand how the native op works. If I get the opportunity, I’ll write up a workaround for this case too.

---

_[View the full topic](https://community.konduit.ai/t/error-using-tensormmul-on-permuted-tensor/675)._
