You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
broadcast_like "Broadcasts lhs to have the same shape as rhs."
Thus only the shape information of lhs and rhs array should matter.
However, it also asserts that the dtypes are equal.
The reason that this bug is important: When writing a HybridBlock, the dtype of some input array depends on the user. But some other internally used array may have a fixed dtype that could be unequal of the input dtype.
Workaround is to add an extra cast prior to broadcast_like.
leezu
added a commit
to leezu/gluon-nlp
that referenced
this issue
Nov 19, 2019
* Make GPT2Model a HybridBlock
* Enable gpt2 test for sequence_sampling.py
* Fix
* Hybridize
* Workaround apache/mxnet#16851
* Fix#1015
* Enable test
* Ignore warning about package resolution using __spec__ or __package__
Should not assert, should throw an error/exception instead
broadcast_like should be enhanced [Feature request] to support different types
Assigning to Mu for the first part, fixing error messages @zachgk assign [@mli ]
this issue is related to an op that is deprecated in 2.0, so I'm marking this as 1.x.
this issue is probably not a good first issue without pointers on where to look to address it.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
broadcast_like
"Broadcasts lhs to have the same shape as rhs."Thus only the shape information of lhs and rhs array should matter.
However, it also asserts that the dtypes are equal.
Error Message
To Reproduce
mx.nd.broadcast_like(mx.nd.ones((1,)), mx.nd.arange(10, dtype=int))
The text was updated successfully, but these errors were encountered: