Skip to content

Commit

Permalink
plt update net instance, test=model
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeref996 committed Sep 4, 2024
1 parent 25aaae1 commit 4a85e2d
Show file tree
Hide file tree
Showing 30 changed files with 54 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def forward(self, x, ):
"""
forward
"""
out = paddle.nn.functional.dropout2d(x, p=paddle.to_tensor([0.5], dtype='float32', stop_gradient=False), training=True, )
out = paddle.nn.functional.dropout2d(x, p=paddle.to_tensor([0.5], dtype='float32', stop_gradient=False), training=self.training, )
return out


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def forward(
):
var_3 = paddle.nn.functional.common.interpolate(var_0, scale_factor=2, mode='bilinear', align_corners=True)
var_4 = paddle.tensor.manipulation.concat([var_1, var_3], axis=1)
var_5 = paddle.nn.functional.common.dropout2d(var_4, p=0.0, training=True, data_format='NCHW', name=None)
var_5 = paddle.nn.functional.common.dropout2d(var_4, p=0.0, training=self.training, data_format='NCHW', name=None)
var_6 = paddle.nn.functional.conv._conv_nd(var_5, self.parameter_0, bias=None, stride=[1, 1], padding=[0, 0], padding_algorithm='EXPLICIT', dilation=[1, 1], groups=1, data_format='NCHW', channel_dim=1, op_type='conv2d', use_cudnn=True)
var_7 = paddle.nn.functional.common.interpolate(var_6, scale_factor=2, mode='bilinear', align_corners=True)
var_8 = paddle.nn.functional.common.interpolate(var_2, scale_factor=2, mode='bilinear', align_corners=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ def forward(
var_9 = var_5.matmul(var_8)
var_10 = var_9.__mul__(0.125)
var_11 = paddle.nn.functional.activation.softmax(var_10, axis=-1)
var_12 = paddle.nn.functional.common.dropout(var_11, p=0.0, axis=None, training=True, mode='upscale_in_train', name=None)
var_12 = paddle.nn.functional.common.dropout(var_11, p=0.0, axis=None, training=self.training, mode='upscale_in_train', name=None)
var_13 = var_12.matmul(var_7)
var_14 = var_13.transpose((0, 2, 1, 3,))
var_15 = var_14.reshape((-1, 198, 192,))
var_16 = paddle.nn.functional.common.linear(x=var_15, weight=self.parameter_1, bias=self.parameter_4, name=None)
var_17 = paddle.nn.functional.common.dropout(var_16, p=0.0, axis=None, training=True, mode='upscale_in_train', name=None)
var_17 = paddle.nn.functional.common.dropout(var_16, p=0.0, axis=None, training=self.training, mode='upscale_in_train', name=None)
return var_17


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def forward(
var_0, # (shape: [43, 1280, 7, 7], dtype: paddle.float32, stop_gradient: False)
):
var_1 = paddle.nn.functional.pooling.adaptive_avg_pool2d(var_0, output_size=1, data_format='NCHW', name=None)
var_2 = paddle.nn.functional.common.dropout(var_1, p=0.2, axis=None, training=True, mode='upscale_in_train', name=None)
var_2 = paddle.nn.functional.common.dropout(var_1, p=0.2, axis=None, training=self.training, mode='upscale_in_train', name=None)
var_3 = paddle.tensor.manipulation.squeeze(var_2, axis=[2, 3])
var_4 = paddle.nn.functional.common.linear(x=var_3, weight=self.parameter_1, bias=self.parameter_0, name=None)
return var_4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def forward(
):
var_1 = paddle.nn.functional.pooling.adaptive_avg_pool2d(var_0, output_size=1, data_format='NCHW', name=None)
var_2 = paddle.tensor.manipulation.squeeze(var_1, axis=[2, 3])
var_3 = paddle.nn.functional.common.dropout(var_2, p=0.2, axis=None, training=True, mode='downscale_in_infer', name=None)
var_3 = paddle.nn.functional.common.dropout(var_2, p=0.2, axis=None, training=self.training, mode='downscale_in_infer', name=None)
var_4 = paddle.nn.functional.common.linear(x=var_3, weight=self.parameter_0, bias=self.parameter_1, name=None)
return var_4

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def forward(
):
var_1 = paddle.nn.functional.pooling.adaptive_avg_pool2d(var_0, output_size=1, data_format='NCHW', name=None)
var_2 = var_1.reshape([43, 320])
var_3 = paddle.nn.functional.common.dropout(var_2, p=0.1, axis=None, training=True, mode='upscale_in_train', name=None)
var_3 = paddle.nn.functional.common.dropout(var_2, p=0.1, axis=None, training=self.training, mode='upscale_in_train', name=None)
var_4 = paddle.nn.functional.common.linear(x=var_3, weight=self.parameter_1, bias=self.parameter_0, name=None)
return var_4

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def forward(
):
var_1 = paddle.nn.functional.pooling.avg_pool2d(var_0, kernel_size=[7, 7])
var_2 = var_1.flatten(1)
var_3 = paddle.nn.functional.common.dropout(var_2, p=0.05, training=True)
var_3 = paddle.nn.functional.common.dropout(var_2, p=0.05, training=self.training)
var_4 = paddle.nn.functional.common.linear(x=var_3, weight=self.parameter_0, bias=self.parameter_1, name=None)
return var_4

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def forward(
self,
var_0, # (shape: [22, 3840, 1, 1], dtype: paddle.float32, stop_gradient: False)
):
var_1 = paddle.nn.functional.common.dropout(var_0, p=0.2, axis=None, training=True, mode='upscale_in_train', name=None)
var_1 = paddle.nn.functional.common.dropout(var_0, p=0.2, axis=None, training=self.training, mode='upscale_in_train', name=None)
var_2 = paddle.nn.functional.conv._conv_nd(var_1, self.parameter_1, bias=self.parameter_0, stride=[1, 1], padding=[0, 0], padding_algorithm='EXPLICIT', dilation=[1, 1], groups=1, data_format='NCHW', channel_dim=1, op_type='conv2d', use_cudnn=True)
var_3 = var_2.squeeze(axis=-1)
var_4 = var_3.squeeze(axis=-1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def forward(
var_59 = paddle.nn.functional.conv._conv_nd(var_56, self.parameter_2, bias=self.parameter_30, stride=[1, 1], padding=[1, 1], padding_algorithm='EXPLICIT', dilation=[1, 1], groups=1, data_format='NCHW', channel_dim=1, op_type='conv2d', use_cudnn=True)
var_60 = paddle.nn.functional.activation.relu(var_59)
var_61 = paddle.tensor.manipulation.concat([var_58, var_60], axis=1)
var_62 = paddle.nn.functional.common.dropout(var_61, p=0.5, axis=None, training=True, mode='downscale_in_infer', name=None)
var_62 = paddle.nn.functional.common.dropout(var_61, p=0.5, axis=None, training=self.training, mode='downscale_in_infer', name=None)
var_63 = paddle.nn.functional.conv._conv_nd(var_62, self.parameter_29, bias=self.parameter_44, stride=[1, 1], padding=[0, 0], padding_algorithm='EXPLICIT', dilation=[1, 1], groups=1, data_format='NCHW', channel_dim=1, op_type='conv2d', use_cudnn=True)
var_64 = paddle.nn.functional.activation.relu(var_63)
var_65 = paddle.nn.functional.pooling.adaptive_avg_pool2d(var_64, output_size=1, data_format='NCHW', name=None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def forward(
var_2 = var_1.flatten(2)
var_3 = var_2.transpose([0, 2, 1])
var_4 = paddle.nn.functional.norm.layer_norm(var_3, normalized_shape=[96], weight=self.parameter_3, bias=self.parameter_2, epsilon=1e-05)
var_5 = paddle.nn.functional.common.dropout(var_4, p=0.0, axis=None, training=True, mode='upscale_in_train', name=None)
var_5 = paddle.nn.functional.common.dropout(var_4, p=0.0, axis=None, training=self.training, mode='upscale_in_train', name=None)
return var_5


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def forward(
self,
var_0, # (shape: [22, 2048, 10, 10], dtype: paddle.float32, stop_gradient: False)
):
var_1 = paddle.nn.functional.common.dropout(var_0, p=0.5, axis=None, training=True, mode='downscale_in_infer', name=None)
var_1 = paddle.nn.functional.common.dropout(var_0, p=0.5, axis=None, training=self.training, mode='downscale_in_infer', name=None)
var_2 = paddle.nn.functional.pooling.adaptive_avg_pool2d(var_1, output_size=1, data_format='NCHW', name=None)
var_3 = paddle.tensor.manipulation.squeeze(var_2, axis=[2, 3])
var_4 = paddle.nn.functional.common.linear(x=var_3, weight=self.parameter_1, bias=self.parameter_0, name=None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def forward(
var_6 = var_5.reshape([-1, 96, 160, 240])
var_7 = var_6.flatten(2)
var_8 = var_7.transpose([0, 2, 1])
var_9 = paddle.nn.functional.common.dropout(var_8, p=0.0, axis=None, training=True, mode='upscale_in_train', name=None)
var_9 = paddle.nn.functional.common.dropout(var_8, p=0.0, axis=None, training=self.training, mode='upscale_in_train', name=None)
return var_9


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ def forward(
var_0, # (shape: [1, 361, 1024], dtype: paddle.float32, stop_gradient: False)
var_1, # (shape: [1, 361, 1024], dtype: paddle.float32, stop_gradient: False)
):
var_2 = paddle.nn.functional.common.dropout(var_0, p=0.1, axis=None, training=True, mode='upscale_in_train', name=None)
var_2 = paddle.nn.functional.common.dropout(var_0, p=0.1, axis=None, training=self.training, mode='upscale_in_train', name=None)
var_3 = var_1.__add__(var_2)
var_4 = paddle.nn.functional.norm.layer_norm(var_3, normalized_shape=[1024], weight=self.parameter_6, bias=self.parameter_7, epsilon=1e-05)
var_5 = paddle.nn.functional.common.linear(x=var_4, weight=self.parameter_4, bias=self.parameter_5, name=None)
var_6 = paddle.nn.functional.activation.gelu(var_5)
var_7 = paddle.nn.functional.common.dropout(var_6, p=0.1, axis=None, training=True, mode='upscale_in_train', name=None)
var_7 = paddle.nn.functional.common.dropout(var_6, p=0.1, axis=None, training=self.training, mode='upscale_in_train', name=None)
var_8 = paddle.nn.functional.common.linear(x=var_7, weight=self.parameter_1, bias=self.parameter_0, name=None)
var_9 = paddle.nn.functional.common.dropout(var_8, p=0.1, axis=None, training=True, mode='upscale_in_train', name=None)
var_9 = paddle.nn.functional.common.dropout(var_8, p=0.1, axis=None, training=self.training, mode='upscale_in_train', name=None)
var_10 = var_4.__add__(var_9)
var_11 = paddle.nn.functional.norm.layer_norm(var_10, normalized_shape=[1024], weight=self.parameter_2, bias=self.parameter_3, epsilon=1e-05)
return var_11
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ def forward(
var_15 = var_11.matmul(var_14)
var_16 = var_15.__mul__(0.125)
var_17 = paddle.nn.functional.activation.softmax(var_16, axis=-1)
var_18 = paddle.nn.functional.common.dropout(var_17, p=0.0, axis=None, training=True, mode='upscale_in_train', name=None)
var_18 = paddle.nn.functional.common.dropout(var_17, p=0.0, axis=None, training=self.training, mode='upscale_in_train', name=None)
var_19 = var_18.matmul(var_13)
var_20 = var_19.transpose((0, 2, 1, 3,))
var_21 = var_20.reshape((-1, var_3, var_4,))
var_22 = paddle.nn.functional.common.linear(x=var_21, weight=self.parameter_5, bias=self.parameter_0, name=None)
var_23 = paddle.nn.functional.common.dropout(var_22, p=0.0, axis=None, training=True, mode='upscale_in_train', name=None)
var_23 = paddle.nn.functional.common.dropout(var_22, p=0.0, axis=None, training=self.training, mode='upscale_in_train', name=None)
var_24 = self.parameter_3.__mul__(var_23)
return var_24

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ def forward(
var_11 = var_7.matmul(var_10)
var_12 = var_11.__add__(var_1)
var_13 = paddle.nn.functional.activation.softmax(var_12, axis=-1)
var_14 = paddle.nn.functional.common.dropout(var_13, p=0.0, axis=None, training=True, mode='upscale_in_train', name=None)
var_14 = paddle.nn.functional.common.dropout(var_13, p=0.0, axis=None, training=self.training, mode='upscale_in_train', name=None)
var_15 = var_14.matmul(var_9)
var_16 = var_15.transpose((0, 2, 1, 3,))
var_17 = var_16.reshape((0, -1, 128,))
var_18 = paddle.nn.functional.common.linear(x=var_17, weight=self.parameter_5, bias=self.parameter_2, name=None)
var_19 = paddle.nn.functional.common.dropout(var_18, p=0.0, axis=None, training=True, mode='upscale_in_train', name=None)
var_19 = paddle.nn.functional.common.dropout(var_18, p=0.0, axis=None, training=self.training, mode='upscale_in_train', name=None)
return var_19


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ def forward(
var_9 = var_7.transpose((0, 1, 3, 2,))
var_10 = var_6.matmul(var_9)
var_11 = paddle.nn.functional.activation.softmax(var_10, axis=-1)
var_12 = paddle.nn.functional.common.dropout(var_11, p=0.0, axis=None, training=True, mode='upscale_in_train', name=None)
var_12 = paddle.nn.functional.common.dropout(var_11, p=0.0, axis=None, training=self.training, mode='upscale_in_train', name=None)
var_13 = var_12.matmul(var_8)
var_14 = var_13.transpose((0, 2, 1, 3,))
var_15 = var_14.reshape((0, -1, 128,))
var_16 = paddle.nn.functional.common.linear(x=var_15, weight=self.parameter_0, bias=self.parameter_5, name=None)
var_17 = paddle.nn.functional.common.dropout(var_16, p=0.0, axis=None, training=True, mode='upscale_in_train', name=None)
var_17 = paddle.nn.functional.common.dropout(var_16, p=0.0, axis=None, training=self.training, mode='upscale_in_train', name=None)
return var_17


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ def forward(
var_2, # (shape: [1, 2048, 64, 128], dtype: paddle.float32, stop_gradient: False)
):
var_3 = var_0.__add__(var_1)
var_4 = paddle.nn.functional.common.dropout2d(var_3, p=0.1, training=True, data_format='NCHW', name=None)
var_4 = paddle.nn.functional.common.dropout2d(var_3, p=0.1, training=self.training, data_format='NCHW', name=None)
var_5 = paddle.nn.functional.conv._conv_nd(var_4, self.parameter_0, bias=self.parameter_1, stride=[1, 1], padding=[0, 0], padding_algorithm='EXPLICIT', dilation=[1, 1], groups=1, data_format='NCHW', channel_dim=1, op_type='conv2d', use_cudnn=True)
var_6 = paddle.nn.functional.common.dropout2d(var_1, p=0.1, training=True, data_format='NCHW', name=None)
var_6 = paddle.nn.functional.common.dropout2d(var_1, p=0.1, training=self.training, data_format='NCHW', name=None)
var_7 = paddle.nn.functional.conv._conv_nd(var_6, self.parameter_4, bias=self.parameter_5, stride=[1, 1], padding=[0, 0], padding_algorithm='EXPLICIT', dilation=[1, 1], groups=1, data_format='NCHW', channel_dim=1, op_type='conv2d', use_cudnn=True)
var_8 = paddle.nn.functional.common.dropout2d(var_0, p=0.1, training=True, data_format='NCHW', name=None)
var_8 = paddle.nn.functional.common.dropout2d(var_0, p=0.1, training=self.training, data_format='NCHW', name=None)
var_9 = paddle.nn.functional.conv._conv_nd(var_8, self.parameter_4, bias=self.parameter_5, stride=[1, 1], padding=[0, 0], padding_algorithm='EXPLICIT', dilation=[1, 1], groups=1, data_format='NCHW', channel_dim=1, op_type='conv2d', use_cudnn=True)
var_10 = paddle.nn.functional.common.dropout2d(var_2, p=0.1, training=True, data_format='NCHW', name=None)
var_10 = paddle.nn.functional.common.dropout2d(var_2, p=0.1, training=self.training, data_format='NCHW', name=None)
var_11 = paddle.nn.functional.conv._conv_nd(var_10, self.parameter_3, bias=self.parameter_2, stride=[1, 1], padding=[0, 0], padding_algorithm='EXPLICIT', dilation=[1, 1], groups=1, data_format='NCHW', channel_dim=1, op_type='conv2d', use_cudnn=True)
return var_5, var_7, var_9, var_11

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def forward(
self,
var_0, # (shape: [1, 128, 64, 128], dtype: paddle.float32, stop_gradient: False)
):
var_1 = paddle.nn.functional.common.dropout2d(var_0, p=0.1, training=True, data_format='NCHW', name=None)
var_1 = paddle.nn.functional.common.dropout2d(var_0, p=0.1, training=self.training, data_format='NCHW', name=None)
return var_1


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def forward(
var_0, # (shape: [1, 128, 64, 128], dtype: paddle.float32, stop_gradient: False)
var_1, # (shape: [1, 128, 64, 128], dtype: paddle.float32, stop_gradient: False)
):
var_2 = paddle.nn.functional.common.dropout2d(var_0, p=0.1, training=True, data_format='NCHW', name=None)
var_2 = paddle.nn.functional.common.dropout2d(var_0, p=0.1, training=self.training, data_format='NCHW', name=None)
var_3 = var_1.__add__(var_2)
return var_3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def forward(
):
var_3 = paddle.nn.functional.common.interpolate(var_0, scale_factor=2, mode='bilinear', align_corners=True)
var_4 = paddle.tensor.manipulation.concat([var_1, var_3], axis=1)
var_5 = paddle.nn.functional.common.dropout2d(var_4, p=0.0, training=True, data_format='NCHW', name=None)
var_5 = paddle.nn.functional.common.dropout2d(var_4, p=0.0, training=self.training, data_format='NCHW', name=None)
var_6 = paddle.nn.functional.conv._conv_nd(var_5, self.parameter_0, bias=None, stride=[1, 1], padding=[0, 0], padding_algorithm='EXPLICIT', dilation=[1, 1], groups=1, data_format='NCHW', channel_dim=1, op_type='conv2d', use_cudnn=True)
var_7 = paddle.nn.functional.common.interpolate(var_6, scale_factor=2, mode='bilinear', align_corners=True)
var_8 = paddle.nn.functional.common.interpolate(var_2, scale_factor=2, mode='bilinear', align_corners=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ def forward(
var_22 = var_9.__matmul__(var_21)
var_23 = var_22.__mul__(0.125)
var_24 = paddle.nn.functional.activation.softmax(var_23, axis=-1)
var_25 = paddle.nn.functional.common.dropout(var_24, p=0.0, axis=None, training=True, mode='upscale_in_train', name=None)
var_25 = paddle.nn.functional.common.dropout(var_24, p=0.0, axis=None, training=self.training, mode='upscale_in_train', name=None)
var_26 = var_25.__matmul__(var_20)
var_27 = var_26.transpose([0, 2, 1, 3])
var_28 = var_27.reshape([var_5, var_6, 128])
var_29 = paddle.nn.functional.common.linear(x=var_28, weight=self.parameter_8, bias=self.parameter_6, name=None)
var_30 = paddle.nn.functional.common.dropout(var_29, p=0.0, axis=None, training=True, mode='upscale_in_train', name=None)
var_30 = paddle.nn.functional.common.dropout(var_29, p=0.0, axis=None, training=self.training, mode='upscale_in_train', name=None)
return var_30


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ def forward(
var_14 = var_7.__matmul__(var_13)
var_15 = var_14.__mul__(0.125)
var_16 = paddle.nn.functional.activation.softmax(var_15, axis=-1)
var_17 = paddle.nn.functional.common.dropout(var_16, p=0.0, axis=None, training=True, mode='upscale_in_train', name=None)
var_17 = paddle.nn.functional.common.dropout(var_16, p=0.0, axis=None, training=self.training, mode='upscale_in_train', name=None)
var_18 = var_17.__matmul__(var_12)
var_19 = var_18.transpose([0, 2, 1, 3])
var_20 = var_19.reshape([var_3, var_4, 512])
var_21 = paddle.nn.functional.common.linear(x=var_20, weight=self.parameter_5, bias=self.parameter_2, name=None)
var_22 = paddle.nn.functional.common.dropout(var_21, p=0.0, axis=None, training=True, mode='upscale_in_train', name=None)
var_22 = paddle.nn.functional.common.dropout(var_21, p=0.0, axis=None, training=self.training, mode='upscale_in_train', name=None)
return var_22


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ def forward(
var_13 = var_9.matmul(var_12)
var_14 = var_13.__mul__(0.125)
var_15 = paddle.nn.functional.activation.softmax(var_14, axis=-1)
var_16 = paddle.nn.functional.common.dropout(var_15, p=0.0, axis=None, training=True, mode='upscale_in_train', name=None)
var_16 = paddle.nn.functional.common.dropout(var_15, p=0.0, axis=None, training=self.training, mode='upscale_in_train', name=None)
var_17 = var_16.matmul(var_11)
var_18 = var_17.transpose((0, 2, 1, 3,))
var_19 = var_18.reshape((-1, var_3, var_4,))
var_20 = paddle.nn.functional.common.linear(x=var_19, weight=self.parameter_4, bias=self.parameter_2, name=None)
var_21 = paddle.nn.functional.common.dropout(var_20, p=0.0, axis=None, training=True, mode='upscale_in_train', name=None)
var_21 = paddle.nn.functional.common.dropout(var_20, p=0.0, axis=None, training=self.training, mode='upscale_in_train', name=None)
return var_21


Expand Down
Loading

0 comments on commit 4a85e2d

Please sign in to comment.