MCPcopy Create free account
hub / github.com/ChristopherLu/milliEgo / FlowNetModule

Function FlowNetModule

utility/networks.py:16–56  ·  view source on GitHub ↗
(input, dup=False)

Source from the content-addressed store, hash-verified

14
15
16def FlowNetModule(input, dup=False):
17 # inout must follow the follow the shape format: (1, H, W, C)
18 if not dup:
19 net = TimeDistributed(Convolution2D(64, 7, 7, subsample=(2, 2), border_mode='same'), name='conv1')(input)
20 net = TimeDistributed(LeakyReLU(alpha=0.1), name='ReLU1')(net)
21 net = TimeDistributed(Convolution2D(128, 5, 5, subsample=(2, 2), border_mode='same'), name='conv2')(net)
22 net = TimeDistributed(LeakyReLU(alpha=0.1), name='ReLU2')(net)
23 net = TimeDistributed(Convolution2D(256, 5, 5, subsample=(2, 2), border_mode='same'), name='conv3')(net)
24 net = TimeDistributed(LeakyReLU(alpha=0.1), name='ReLU3')(net)
25 net = TimeDistributed(Convolution2D(256, 3, 3, subsample=(1, 1), border_mode='same'), name='conv3_1')(net)
26 net = TimeDistributed(LeakyReLU(alpha=0.1), name='ReLU4')(net)
27 net = TimeDistributed(Convolution2D(512, 3, 3, subsample=(2, 2), border_mode='same'), name='conv4')(net)
28 net = TimeDistributed(LeakyReLU(alpha=0.1), name='ReLU5')(net)
29 net = TimeDistributed(Convolution2D(512, 3, 3, subsample=(1, 1), border_mode='same'), name='conv4_1')(net)
30 net = TimeDistributed(LeakyReLU(alpha=0.1), name='ReLU6')(net)
31 net = TimeDistributed(Convolution2D(512, 3, 3, subsample=(2, 2), border_mode='same'), name='conv5')(net)
32 net = TimeDistributed(LeakyReLU(alpha=0.1), name='ReLU7')(net)
33 net = TimeDistributed(Convolution2D(512, 3, 3, subsample=(1, 1), border_mode='same'), name='conv5_1')(net)
34 net = TimeDistributed(LeakyReLU(alpha=0.1), name='ReLU8')(net)
35 net = TimeDistributed(Convolution2D(1024, 3, 3, subsample=(2, 2), border_mode='same'), name='conv6')(net)
36 net = TimeDistributed(LeakyReLU(alpha=0.1), name='ReLU9')(net)
37 else:
38 net = TimeDistributed(Convolution2D(64, 7, 7, subsample=(2, 2), border_mode='same'), name='conv1'+'_dup')(input)
39 net = TimeDistributed(LeakyReLU(alpha=0.1), name='ReLU1'+'_dup')(net)
40 net = TimeDistributed(Convolution2D(128, 5, 5, subsample=(2, 2), border_mode='same'), name='conv2'+'_dup')(net)
41 net = TimeDistributed(LeakyReLU(alpha=0.1), name='ReLU2'+'_dup')(net)
42 net = TimeDistributed(Convolution2D(256, 5, 5, subsample=(2, 2), border_mode='same'), name='conv3'+'_dup')(net)
43 net = TimeDistributed(LeakyReLU(alpha=0.1), name='ReLU3'+'_dup')(net)
44 net = TimeDistributed(Convolution2D(256, 3, 3, subsample=(1, 1), border_mode='same'), name='conv3_1'+'_dup')(net)
45 net = TimeDistributed(LeakyReLU(alpha=0.1), name='ReLU4'+'_dup')(net)
46 net = TimeDistributed(Convolution2D(512, 3, 3, subsample=(2, 2), border_mode='same'), name='conv4'+'_dup')(net)
47 net = TimeDistributed(LeakyReLU(alpha=0.1), name='ReLU5'+'_dup')(net)
48 net = TimeDistributed(Convolution2D(512, 3, 3, subsample=(1, 1), border_mode='same'), name='conv4_1'+'_dup')(net)
49 net = TimeDistributed(LeakyReLU(alpha=0.1), name='ReLU6'+'_dup')(net)
50 net = TimeDistributed(Convolution2D(512, 3, 3, subsample=(2, 2), border_mode='same'), name='conv5'+'_dup')(net)
51 net = TimeDistributed(LeakyReLU(alpha=0.1), name='ReLU7'+'_dup')(net)
52 net = TimeDistributed(Convolution2D(512, 3, 3, subsample=(1, 1), border_mode='same'), name='conv5_1'+'_dup')(net)
53 net = TimeDistributed(LeakyReLU(alpha=0.1), name='ReLU8'+'_dup')(net)
54 net = TimeDistributed(Convolution2D(1024, 3, 3, subsample=(2, 2), border_mode='same'), name='conv6'+'_dup')(net)
55 net = TimeDistributed(LeakyReLU(alpha=0.1), name='ReLU9'+'_dup')(net)
56 return net
57
58################################################################
59# model building functions for lidar, radar and panoramic inputs.

Callers 1

build_model_cross_attFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected