Skip to content
Snippets Groups Projects
Commit add452bf authored by BING GONG's avatar BING GONG
Browse files

minor bugs for weatherBench3DCNN model

parent f098224b
No related branches found
No related tags found
No related merge requests found
Pipeline #102286 passed
{
"batch_size": 4,
"lr": 0.001,
"max_epochs":20,
"context_frames":12,
"loss_fun":"mse",
"opt_var": "0",
"shuffle_on_val":true
}
...@@ -109,7 +109,6 @@ class WeatherBenchModel(object): ...@@ -109,7 +109,6 @@ class WeatherBenchModel(object):
return output return output
class PeriodicPadding2D(object): class PeriodicPadding2D(object):
def __init__(self, x, pad_width): def __init__(self, x, pad_width):
...@@ -118,6 +117,7 @@ class PeriodicPadding2D(object): ...@@ -118,6 +117,7 @@ class PeriodicPadding2D(object):
def call(self, inputs, **kwargs): def call(self, inputs, **kwargs):
if self.pad_width == 0: if self.pad_width == 0:
return inputs return inputs
inputs_padded = tf.concat( inputs_padded = tf.concat(
[inputs[:, :, -self.pad_width:, :], inputs, inputs[:, :, :self.pad_width, :]], axis=2) [inputs[:, :, -self.pad_width:, :], inputs, inputs[:, :, :self.pad_width, :]], axis=2)
...@@ -126,6 +126,7 @@ class PeriodicPadding2D(object): ...@@ -126,6 +126,7 @@ class PeriodicPadding2D(object):
return inputs_padded return inputs_padded
class PeriodicConv2D(object): class PeriodicConv2D(object):
def __init__(self, filters, kernel_size, conv_kwargs={}): def __init__(self, filters, kernel_size, conv_kwargs={}):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment