Commit 8a8ed262 authored by Nicola Gatto's avatar Nicola Gatto

Adjust tests

parent cdc08ba5
......@@ -74,9 +74,9 @@ class Net(gluon.HybridBlock):
with self.name_scope():
if not data_mean is None:
assert(not data_std is None)
self.input_normalization = ZScoreNormalization(data_mean=data_mean, data_std=data_std)
self.image_input_normalization = ZScoreNormalization(data_mean=data_mean, data_std=data_std)
else:
self.input_normalization = NoNormalization()
self.image_input_normalization = NoNormalization()
self.conv1_ = gluon.nn.Conv2D(channels=20,
kernel_size=(5,5),
......@@ -112,8 +112,8 @@ class Net(gluon.HybridBlock):
self.last_layer = 'softmax'
def hybrid_forward(self, F, x):
image = self.input_normalization(x)
def hybrid_forward(self, F, image):
image = self.image_input_normalization(image)
conv1_ = self.conv1_(image)
pool1_ = self.pool1_(conv1_)
conv2_ = self.conv2_(pool1_)
......
......@@ -74,9 +74,9 @@ class Net(gluon.HybridBlock):
with self.name_scope():
if not data_mean is None:
assert(not data_std is None)
self.input_normalization = ZScoreNormalization(data_mean=data_mean, data_std=data_std)
self.state_input_normalization = ZScoreNormalization(data_mean=data_mean, data_std=data_std)
else:
self.input_normalization = NoNormalization()
self.state_input_normalization = NoNormalization()
self.fc1_ = gluon.nn.Dense(units=128, use_bias=True)
# fc1_, output shape: {[128,1,1]}
......@@ -93,8 +93,8 @@ class Net(gluon.HybridBlock):
self.last_layer = 'linear'
def hybrid_forward(self, F, x):
state = self.input_normalization(x)
def hybrid_forward(self, F, state):
state = self.state_input_normalization(state)
fc1_ = self.fc1_(state)
tanh1_ = self.tanh1_(fc1_)
fc2_ = self.fc2_(tanh1_)
......
......@@ -74,9 +74,9 @@ class Net(gluon.HybridBlock):
with self.name_scope():
if not data_mean is None:
assert(not data_std is None)
self.input_normalization = ZScoreNormalization(data_mean=data_mean, data_std=data_std)
self.state_input_normalization = ZScoreNormalization(data_mean=data_mean, data_std=data_std)
else:
self.input_normalization = NoNormalization()
self.state_input_normalization = NoNormalization()
self.fc1_ = gluon.nn.Dense(units=512, use_bias=True)
# fc1_, output shape: {[512,1,1]}
......@@ -93,8 +93,8 @@ class Net(gluon.HybridBlock):
self.last_layer = 'linear'
def hybrid_forward(self, F, x):
state = self.input_normalization(x)
def hybrid_forward(self, F, state):
state = self.state_input_normalization(state)
fc1_ = self.fc1_(state)
tanh1_ = self.tanh1_(fc1_)
fc2_ = self.fc2_(tanh1_)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment