-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request] I think we should hybridize the segmentation models. #547
Comments
Agreed, @zhanghang1989 we might be able to modify the operator by allowing it to take NDArray shapes rather than arguments only. |
@chinakook @zhreshold Right now, the training of semantic segmentation depends on sync batchnorm, which utilizes https://github.com/dmlc/gluon-cv/blob/master/scripts/segmentation/train.py#L163-L164 And our implementation of https://github.com/dmlc/gluon-cv/blob/master/gluoncv/utils/parallel.py#L3 I searched online for a while, and it seems MXNet is not thread-safe. So the training of semantic segmentation models is not hybridizable, as long as we need syncbn. It will throw a bug something like this,
The inference of semantic segmentation is hybridizable though. |
Maybe we can do local distributed training style instead of multithreading |
The SyncBN is implemented in operator level, which does not support distributed training. The synchronization happens within the operator and bypass the engine. |
The op F.contrib.BilinearResize2D need to explicitly know the destination size, so the segmentation models is not hybridized now in order to dynamically determine the destination size.
I think we should hybridize the models later to improve performance and reduce memory consuming.
The text was updated successfully, but these errors were encountered: