Rename ctc to gpu_ctc in GPU CTC tests

上级 c85d52ce
...@@ -7,7 +7,7 @@ import theano ...@@ -7,7 +7,7 @@ import theano
import theano.tensor as T import theano.tensor as T
from theano.tests import unittest_tools as utt from theano.tests import unittest_tools as utt
import theano.gpuarray import theano.gpuarray
from theano.gpuarray.ctc import (ctc_enabled, ctc) from theano.gpuarray.ctc import (ctc_enabled, gpu_ctc)
class TestCTC(unittest.TestCase): class TestCTC(unittest.TestCase):
...@@ -21,7 +21,7 @@ class TestCTC(unittest.TestCase): ...@@ -21,7 +21,7 @@ class TestCTC(unittest.TestCase):
t_activation_times = theano.shared(input_length, name="activation_times") t_activation_times = theano.shared(input_length, name="activation_times")
t_labels = theano.shared(labels, name="labels") t_labels = theano.shared(labels, name="labels")
t_cost = ctc(t_activations, t_labels, t_activation_times) t_cost = gpu_ctc(t_activations, t_labels, t_activation_times)
# Symbolic gradient of CTC cost # Symbolic gradient of CTC cost
t_grad = T.grad(T.mean(t_cost), t_activations) t_grad = T.grad(T.mean(t_cost), t_activations)
# Compile symbolic functions # Compile symbolic functions
...@@ -99,7 +99,7 @@ class TestCTC(unittest.TestCase): ...@@ -99,7 +99,7 @@ class TestCTC(unittest.TestCase):
# Create auxiliary symbolic variables # Create auxiliary symbolic variables
t_activation_times = theano.shared(in_lengths, name="activation_times") t_activation_times = theano.shared(in_lengths, name="activation_times")
t_labels = theano.shared(labels, name="labels") t_labels = theano.shared(labels, name="labels")
return ctc(acts, t_labels, t_activation_times) return gpu_ctc(acts, t_labels, t_activation_times)
return wrapper return wrapper
activations = np.asarray([[[0.1, 0.6, 0.1, 0.1, 0.1], [0.1, 0.1, 0.6, 0.1, 0.1]], activations = np.asarray([[[0.1, 0.6, 0.1, 0.1, 0.1], [0.1, 0.1, 0.6, 0.1, 0.1]],
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论