File tree 3 files changed +22
-0
lines changed
3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -3022,7 +3022,9 @@ python.Execution = class {
3022
3022
return ;
3023
3023
}
3024
3024
else if ( target . type === 'tuple' ) {
3025
+ context . target . push ( target . value ) ;
3025
3026
const value = this . expression ( expression . expression , context ) ;
3027
+ context . target . pop ( ) ;
3026
3028
if ( target . value . every ( ( item ) => item . type === 'id' ) ) {
3027
3029
if ( target . value . length < value . length ) {
3028
3030
throw new python . Error ( 'ValueError: too many values to unpack (expected ' + target . value . length + ', actual ' + value . length + ').' ) ;
@@ -3287,6 +3289,11 @@ python.Execution.Context = class {
3287
3289
}
3288
3290
return undefined ;
3289
3291
}
3292
+
3293
+ get target ( ) {
3294
+ this . _target = this . _target || [ ] ;
3295
+ return this . _target ;
3296
+ }
3290
3297
} ;
3291
3298
3292
3299
python . Utility = class {
Original file line number Diff line number Diff line change @@ -3146,6 +3146,11 @@ pytorch.Container.Zip.Execution = class extends pytorch.Execution {
3146
3146
case 'torch.unbind' :
3147
3147
count = args [ 0 ] . __tuple__ || count ;
3148
3148
break ;
3149
+ case 'torch.split' :
3150
+ if ( context . target . length > 0 ) {
3151
+ count = context . target [ context . target . length - 1 ] . length ;
3152
+ }
3153
+ break ;
3149
3154
}
3150
3155
const tensors = [ ] ;
3151
3156
const outputs = [ ] ;
Original file line number Diff line number Diff line change 5057
5057
"format" : " TorchScript v1.6" ,
5058
5058
"link" : " https://github.com/lutzroeder/netron/issues/827"
5059
5059
},
5060
+ {
5061
+ "type" : " pytorch" ,
5062
+ "target" : " yolo4_tiny.pt" ,
5063
+ "source" : " https://github.com/lutzroeder/netron/files/7995416/yolo4_tiny.pt.zip[yolo4_tiny.pt]" ,
5064
+ "format" : " TorchScript v1.5" ,
5065
+ "link" : " https://github.com/lutzroeder/netron/issues/842"
5066
+ },
5067
+
5068
+
5069
+
5060
5070
{
5061
5071
"type" : " rknn" ,
5062
5072
"target" : " autopilot.rknn" ,
You can’t perform that action at this time.
0 commit comments