38e4d1a3b78d6cac37864ae96aaeceab17d556bf,tests/q_functions_tests/test_state_action_q_function.py,TestFCLateActionSAQFunction,_test_call,#TestFCLateActionSAQFunction#Any#,213
Before Change
nonlinearity=nonlinearity,
last_wscale=self.last_wscale,
)
batch_size = 7
obs = np.random.rand(batch_size, self.n_dim_obs).astype(np.float32)
action = np.random.rand(
batch_size, self.n_dim_action).astype(np.float32)
if gpu >= 0:
qf.to_gpu(gpu)
obs = chainer.cuda.to_gpu(obs)
action = chainer.cuda.to_gpu(action)
y = qf(obs, action)
self.assertTrue(isinstance(y, chainer.Variable))
self.assertEqual(y.shape, (batch_size, 1))
self.assertEqual(chainer.cuda.get_array_module(y),
chainer.cuda.get_array_module(obs))
After Change
nonlinearity=nonlinearity,
last_wscale=self.last_wscale,
)
self._test_call_given_model(model, gpu)
def test_call_cpu(self):
self._test_call(gpu=-1)
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 26
Instances
Project Name: chainer/chainerrl
Commit Name: 38e4d1a3b78d6cac37864ae96aaeceab17d556bf
Time: 2017-11-14
Author: muupan@gmail.com
File Name: tests/q_functions_tests/test_state_action_q_function.py
Class Name: TestFCLateActionSAQFunction
Method Name: _test_call
Project Name: chainer/chainerrl
Commit Name: 38e4d1a3b78d6cac37864ae96aaeceab17d556bf
Time: 2017-11-14
Author: muupan@gmail.com
File Name: tests/q_functions_tests/test_state_action_q_function.py
Class Name: TestFCBNLateActionSAQFunction
Method Name: _test_call
Project Name: chainer/chainerrl
Commit Name: 38e4d1a3b78d6cac37864ae96aaeceab17d556bf
Time: 2017-11-14
Author: muupan@gmail.com
File Name: tests/q_functions_tests/test_state_action_q_function.py
Class Name: TestFCBNSAQFunction
Method Name: _test_call
Project Name: chainer/chainerrl
Commit Name: 38e4d1a3b78d6cac37864ae96aaeceab17d556bf
Time: 2017-11-14
Author: muupan@gmail.com
File Name: tests/q_functions_tests/test_state_action_q_function.py
Class Name: TestFCLSTMSAQFunction
Method Name: _test_call
Project Name: chainer/chainerrl
Commit Name: 38e4d1a3b78d6cac37864ae96aaeceab17d556bf
Time: 2017-11-14
Author: muupan@gmail.com
File Name: tests/q_functions_tests/test_state_action_q_function.py
Class Name: TestFCSAQFunction
Method Name: _test_call
Project Name: chainer/chainerrl
Commit Name: 38e4d1a3b78d6cac37864ae96aaeceab17d556bf
Time: 2017-11-14
Author: muupan@gmail.com
File Name: tests/q_functions_tests/test_state_action_q_function.py
Class Name: TestFCLateActionSAQFunction
Method Name: _test_call