File size: 657 Bytes
5d21dd2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import logging
import math

from models.modules.Inv_arch import *
from models.modules.Subnet_constructor import subnet

logger = logging.getLogger('base')

####################
# define network
####################
def define_G_v2(opt):
	opt_net = opt['network_G']
	which_model = opt_net['which_model_G']
	subnet_type = which_model['subnet_type']
	opt_datasets = opt['datasets']
	down_num = int(math.log(opt_net['scale'], 2))
	if opt['num_image'] == 1:
		netG = VSN(opt, subnet(subnet_type, 'xavier'), subnet(subnet_type, 'xavier'), down_num)
	else:
		netG = VSN(opt, subnet(subnet_type, 'xavier'), subnet(subnet_type, 'xavier_v2'), down_num)

	return netG