本文整理汇总了Python中chainer.FunctionSet.conv4_3_1方法的典型用法代码示例。如果您正苦于以下问题:Python FunctionSet.conv4_3_1方法的具体用法?Python FunctionSet.conv4_3_1怎么用?Python FunctionSet.conv4_3_1使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类chainer.FunctionSet
的用法示例。
在下文中一共展示了FunctionSet.conv4_3_1方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from chainer import FunctionSet [as 别名]
# 或者: from chainer.FunctionSet import conv4_3_1 [as 别名]
class DQN_class:
# Hyper-Parameters
gamma = 0.99 # Discount factor
def __init__(self, enable_controller=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]):
self.num_of_actions = len(enable_controller)
self.enable_controller = enable_controller # Default setting : "Pong"
print "Initializing DQN..."
# Initialization of Chainer 1.1.0 or older.
# print "CUDA init"
# cuda.init()
print "Model Building"
w = math.sqrt(2) # MSRA scaling
self.model = FunctionSet(
conv1=F.Convolution2D(3, 64, 7, wscale=w, stride=2, pad=3),
conv2_1_1=F.Convolution2D(64, 64, 1, wscale=w, stride=1),
conv2_1_2=F.Convolution2D(64, 64, 3, wscale=w, stride=1, pad=1),
conv2_1_3=F.Convolution2D(64, 256, 1, wscale=w, stride=1),
conv2_1_ex=F.Convolution2D(64, 256, 1, wscale=w, stride=1),
conv2_2_1=F.Convolution2D(256, 64, 1, wscale=w, stride=1),
conv2_2_2=F.Convolution2D(64, 64, 3, wscale=w, stride=1, pad=1),
conv2_2_3=F.Convolution2D(64, 256, 1, wscale=w, stride=1),
conv2_3_1=F.Convolution2D(256, 64, 1, wscale=w, stride=1),
conv2_3_2=F.Convolution2D(64, 64, 3, wscale=w, stride=1, pad=1),
conv2_3_3=F.Convolution2D(64, 256, 1, wscale=w, stride=1),
conv3_1_1=F.Convolution2D(256, 128, 1, wscale=w, stride=2),
conv3_1_2=F.Convolution2D(128, 128, 3, wscale=w, stride=1, pad=1),
conv3_1_3=F.Convolution2D(128, 512, 1, wscale=w, stride=1),
conv3_1_ex=F.Convolution2D(256, 512, 1, wscale=w, stride=2),
conv3_2_1=F.Convolution2D(512, 128, 1, wscale=w, stride=1),
conv3_2_2=F.Convolution2D(128, 128, 3, wscale=w, stride=1, pad=1),
conv3_2_3=F.Convolution2D(128, 512, 1, wscale=w, stride=1),
conv3_3_1=F.Convolution2D(512, 128, 1, wscale=w, stride=1),
conv3_3_2=F.Convolution2D(128, 128, 3, wscale=w, stride=1, pad=1),
conv3_3_3=F.Convolution2D(128, 512, 1, wscale=w, stride=1),
conv3_4_1=F.Convolution2D(512, 128, 1, wscale=w, stride=1),
conv3_4_2=F.Convolution2D(128, 128, 3, wscale=w, stride=1, pad=1),
conv3_4_3=F.Convolution2D(128, 512, 1, wscale=w, stride=1),
conv3_5_1=F.Convolution2D(512, 128, 1, wscale=w, stride=1),
conv3_5_2=F.Convolution2D(128, 128, 3, wscale=w, stride=1, pad=1),
conv3_5_3=F.Convolution2D(128, 512, 1, wscale=w, stride=1),
conv3_6_1=F.Convolution2D(512, 128, 1, wscale=w, stride=1),
conv3_6_2=F.Convolution2D(128, 128, 3, wscale=w, stride=1, pad=1),
conv3_6_3=F.Convolution2D(128, 512, 1, wscale=w, stride=1),
conv3_7_1=F.Convolution2D(512, 128, 1, wscale=w, stride=1),
conv3_7_2=F.Convolution2D(128, 128, 3, wscale=w, stride=1, pad=1),
conv3_7_3=F.Convolution2D(128, 512, 1, wscale=w, stride=1),
conv3_8_1=F.Convolution2D(512, 128, 1, wscale=w, stride=1),
conv3_8_2=F.Convolution2D(128, 128, 3, wscale=w, stride=1, pad=1),
conv3_8_3=F.Convolution2D(128, 512, 1, wscale=w, stride=1),
conv4_1_1=F.Convolution2D(512, 256, 1, wscale=w, stride=2),
conv4_1_2=F.Convolution2D(256, 256, 3, wscale=w, stride=1, pad=1),
conv4_1_3=F.Convolution2D(256, 1024, 1, wscale=w, stride=1),
conv4_1_ex=F.Convolution2D(512, 1024, 1, wscale=w, stride=2),
conv4_2_1=F.Convolution2D(1024, 256, 1, wscale=w, stride=1),
conv4_2_2=F.Convolution2D(256, 256, 3, wscale=w, stride=1, pad=1),
conv4_2_3=F.Convolution2D(256, 1024, 1, wscale=w, stride=1),
conv4_3_1=F.Convolution2D(1024, 256, 1, wscale=w, stride=1),
conv4_3_2=F.Convolution2D(256, 256, 3, wscale=w, stride=1, pad=1),
conv4_3_3=F.Convolution2D(256, 1024, 1, wscale=w, stride=1),
conv4_4_1=F.Convolution2D(1024, 256, 1, wscale=w, stride=1),
conv4_4_2=F.Convolution2D(256, 256, 3, wscale=w, stride=1, pad=1),
conv4_4_3=F.Convolution2D(256, 1024, 1, wscale=w, stride=1),
conv4_5_1=F.Convolution2D(1024, 256, 1, wscale=w, stride=1),
conv4_5_2=F.Convolution2D(256, 256, 3, wscale=w, stride=1, pad=1),
conv4_5_3=F.Convolution2D(256, 1024, 1, wscale=w, stride=1),
conv4_6_1=F.Convolution2D(1024, 256, 1, wscale=w, stride=1),
conv4_6_2=F.Convolution2D(256, 256, 3, wscale=w, stride=1, pad=1),
conv4_6_3=F.Convolution2D(256, 1024, 1, wscale=w, stride=1),
conv4_7_1=F.Convolution2D(1024, 256, 1, wscale=w, stride=1),
conv4_7_2=F.Convolution2D(256, 256, 3, wscale=w, stride=1, pad=1),
conv4_7_3=F.Convolution2D(256, 1024, 1, wscale=w, stride=1),
conv4_8_1=F.Convolution2D(1024, 256, 1, wscale=w, stride=1),
conv4_8_2=F.Convolution2D(256, 256, 3, wscale=w, stride=1, pad=1),
conv4_8_3=F.Convolution2D(256, 1024, 1, wscale=w, stride=1),
conv4_9_1=F.Convolution2D(1024, 256, 1, wscale=w, stride=1),
conv4_9_2=F.Convolution2D(256, 256, 3, wscale=w, stride=1, pad=1),
conv4_9_3=F.Convolution2D(256, 1024, 1, wscale=w, stride=1),
conv4_10_1=F.Convolution2D(1024, 256, 1, wscale=w, stride=1),
conv4_10_2=F.Convolution2D(256, 256, 3, wscale=w, stride=1, pad=1),
conv4_10_3=F.Convolution2D(256, 1024, 1, wscale=w, stride=1),
conv4_11_1=F.Convolution2D(1024, 256, 1, wscale=w, stride=1),
conv4_11_2=F.Convolution2D(256, 256, 3, wscale=w, stride=1, pad=1),
conv4_11_3=F.Convolution2D(256, 1024, 1, wscale=w, stride=1),
conv4_12_1=F.Convolution2D(1024, 256, 1, wscale=w, stride=1),
conv4_12_2=F.Convolution2D(256, 256, 3, wscale=w, stride=1, pad=1),
conv4_12_3=F.Convolution2D(256, 1024, 1, wscale=w, stride=1),
conv4_13_1=F.Convolution2D(1024, 256, 1, wscale=w, stride=1),
conv4_13_2=F.Convolution2D(256, 256, 3, wscale=w, stride=1, pad=1),
conv4_13_3=F.Convolution2D(256, 1024, 1, wscale=w, stride=1),
conv4_14_1=F.Convolution2D(1024, 256, 1, wscale=w, stride=1),
conv4_14_2=F.Convolution2D(256, 256, 3, wscale=w, stride=1, pad=1),
conv4_14_3=F.Convolution2D(256, 1024, 1, wscale=w, stride=1),
conv4_15_1=F.Convolution2D(1024, 256, 1, wscale=w, stride=1),
conv4_15_2=F.Convolution2D(256, 256, 3, wscale=w, stride=1, pad=1),
conv4_15_3=F.Convolution2D(256, 1024, 1, wscale=w, stride=1),
conv4_16_1=F.Convolution2D(1024, 256, 1, wscale=w, stride=1),
conv4_16_2=F.Convolution2D(256, 256, 3, wscale=w, stride=1, pad=1),
#.........这里部分代码省略.........