File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 1818import torch
1919import torch .nn as nn
2020import torch .nn .functional as F
21+
2122from monai .networks .blocks .dints_block import (
2223 ActiConvNormBlock ,
2324 FactorizedIncreaseBlock ,
3940class CellInterface (torch .nn .Module ):
4041 """interface for torchscriptable Cell"""
4142
42- def forward (self , x : torch .Tensor , weight : torch . Tensor | None ) -> torch .Tensor : # type: ignore
43+ def forward (self , x : torch .Tensor , weight ) -> torch .Tensor : # type: ignore
4344 pass
4445
4546
@@ -675,9 +676,7 @@ def forward(self, x: list[torch.Tensor]) -> list[torch.Tensor]:
675676 for res_idx , activation in enumerate (self .arch_code_a [blk_idx ].data ):
676677 if activation :
677678 mod : CellInterface = self .cell_tree [str ((blk_idx , res_idx ))]
678- _out = mod .forward (
679- x = inputs [self .arch_code2in [res_idx ]], weight = None
680- )
679+ _out = mod .forward (x = inputs [self .arch_code2in [res_idx ]], weight = None )
681680 outputs [self .arch_code2out [res_idx ]] = outputs [self .arch_code2out [res_idx ]] + _out
682681 inputs = outputs
683682
You can’t perform that action at this time.
0 commit comments