Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
remove hybridize
Browse files Browse the repository at this point in the history
  • Loading branch information
szha committed Aug 3, 2018
1 parent 340dc9d commit 9dde5e7
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions tests/python/unittest/test_gluon_rnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,6 @@ def check_rnn_layer_forward(layer, inputs, states=None, run_only=False):
np_out = out.asnumpy()
np_dx = inputs.grad.asnumpy()

layer.hybridize()

with mx.autograd.record():
if states is not None:
out = layer(inputs, states)
Expand Down Expand Up @@ -402,7 +400,6 @@ def test_rnn_layers():
net.add(gluon.nn.BatchNorm(axis=2))
net.add(gluon.nn.Flatten())
net.add(gluon.nn.Dense(3, activation='relu'))
net.hybridize()
net.collect_params().initialize()
with mx.autograd.record():
net(mx.nd.ones((2, 3, 10))).backward()
Expand All @@ -412,7 +409,6 @@ def test_rnn_layers():
net2.add(gluon.nn.BatchNorm(axis=2))
net2.add(gluon.nn.Flatten())
net2.add(gluon.nn.Dense(3, activation='relu'))
net2.hybridize()
net2.collect_params().initialize()
with mx.autograd.record():
net2(mx.nd.ones((2, 3, 10))).backward()
Expand Down Expand Up @@ -502,7 +498,6 @@ def test_cell_fill_shape():
@assert_raises_cudnn_disabled()
def test_layer_fill_shape():
layer = gluon.rnn.LSTM(10)
layer.hybridize()
check_rnn_layer_forward(layer, mx.nd.ones((3, 2, 7)))
print(layer)
assert layer.l0_i2h_weight.shape[1] == 7, layer.l0_i2h_weight.shape[1]
Expand Down

0 comments on commit 9dde5e7

Please sign in to comment.