class_docstr: Test Baidu CTC wrapper implementation.
  
  Expected values for costs and gradients are obtained through an external
  C implementation, that uses the library directly.
class_docstr_tok: ["Test","Baidu","CTC","wrapper","implementation",".","Expected","values","for","costs","and","gradients","are","obtained","through","an","external","C","implementation",",","that","uses","the","library","directly","."]
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
      """
      ctc_cost = ctc(activations, labels, input_length)
      ctc_function = theano.function([], [ctc_cost])
      for node in ctc_function.maker.fgraph.apply_nodes:
          if isinstance(node.op, ConnectionistTemporalClassification):
              assert node.op.compute_grad is False
  
file_path: Theano/theano/tensor/nnet/tests/test_ctc.py
imports: from __future__ import division, absolute_import, print_function
  import unittest
  from nose.plugins.skip import SkipTest
  import numpy
  import theano
  import theano.tensor
  from theano.tests import unittest_tools
  from theano.tensor.nnet.ctc import ctc_available, ctc, ConnectionistTemporalClassification
label_desc: Use image node_id 3 for calling the TestCTC obj's underlying member method code with example usage: obj.check_grads_disabled(activations, labels, input_length) without return types