code: def run_gpu_optimization_no_grad(
      self, activations, labels, input_length
  ):
      cpu_train = self.setup_cpu_op(
          activations, labels, input_length, compute_grad=False
      )
      cpu_cost = cpu_train()
      # Compile CPU function with optimization
      cpu_lifted_test = self.setup_cpu_op(
          activations,
          labels,
          input_length,
          compute_grad=False,
          mode=mode_with_gpu,
      )
      # Check whether Op is lifted to the GPU
      assert self.has_only_gpu_op(cpu_lifted_test)
      gpu_cost = cpu_lifted_test()
      # Transfer costs from GPU memory to host
      cost_from_gpu = np.asarray(gpu_cost)
      # Compare values from CPU and GPU Ops
      utt.assert_allclose(cpu_cost, cost_from_gpu)
  
imports: from __future__ import division, absolute_import, print_function
  import unittest
  import numpy
  import theano
  import theano.tensor
  from theano.tests import unittest_tools
  import theano.gpuarray
  from theano.gpuarray.ctc import gpu_ctc, GpuConnectionistTemporalClassification
  from theano.tensor.nnet.ctc import ctc, ctc_available, ConnectionistTemporalClassification
  from theano.tensor.nnet.tests.test_ctc import setup_torch_case, setup_ctc_case, setup_grad_case
  from .config import mode_with_gpu, mode_without_gpu
label_desc: Use image node_id 9 for calling the TestCTC obj's underlying member method code with example usage: obj.run_gpu_optimization_no_grad(activations, labels, input_length) without return types