1117 Add TorchScript compatible test#1121
1117 Add TorchScript compatible test#1121ericspod merged 8 commits intoProject-MONAI:masterfrom Nic-Ma:1117-add-torchscript-compatible-test
Conversation
merge master
merge master
[DLMED] fix torchscript issue in densenet (#1114)
Signed-off-by: Nic Ma <[email protected]>
Signed-off-by: Nic Ma <[email protected]>
Signed-off-by: Nic Ma <[email protected]>
|
/black |
ericspod
left a comment
There was a problem hiding this comment.
It looks good other than the comment I made. I also stated in the related issue what needs to be done for the PSP class, that is the up8/16/32/64 members need to be always present so can be nn.Identity if not needed, and line 303 of ahnet.py can be interpolate_size = x.shape[2:]. I was able to get Torchscript to work with AHNet with these changes.
|
Hi @ericspod , Thanks very much for your review. Thanks. |
ericspod
left a comment
There was a problem hiding this comment.
We can review the other networks later, I suspect some of the same issues are present in them as we saw here. Some of the reference networks meant to re-implement published work might not be compatible ever.
Fixes #1117 .
Description
This PR added TorchScript tests for several networks, other networks contain some logic that can't support
torch.jit.scriptand not easy to fix.Status
Ready
Types of changes
./runtests.sh --codeformat --coverage.make htmlcommand in thedocs/folder.