docstr: Check if optimization to disable gradients is working
docstr_tok: ["Check","if","optimization","to","disable","gradients","is","working"]
code: def check_grads_disabled(self, activations, labels, input_length):
      """
      Check if optimization to disable gradients is working
      """
      gpu_ctc_cost = gpu_ctc(activations, labels, input_length)
      gpu_ctc_function = theano.function([], [gpu_ctc_cost])
      for node in gpu_ctc_function.maker.fgraph.apply_nodes:
          if isinstance(
              node.op, GpuConnectionistTemporalClassification
          ):
              assert node.op.compute_grad is False
  
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 7 for calling the TestCTC obj's underlying member method code with example usage: obj.check_grads_disabled(activations, labels, input_length) without return types