def test_min_informative_str():
 A = tensor.matrix(name='A')
 B = tensor.matrix(name='B')
 C = (A + B)
 C.name = 'C'
 D = tensor.matrix(name='D')
 E = tensor.matrix(name='E')
 F = (D + E)
 G = (C + F)
 mis = min_informative_str(G).replace(' DCTB ', '        ')
 reference = 'A. Elemwise{add,no_inplace}\n B. C\n C. Elemwise{add,no_inplace}\n  D. D\n  E. E'
 if (mis != reference):
  print((('--' + mis) + '--'))
  print((('--' + reference) + '--'))
 assert (mis == reference)

def test_min_informative_str ( ) : A = tensor . matrix ( name = 'A' ) B = tensor . matrix ( name = 'B' ) C = ( A + B ) C . name = 'C' D = tensor . matrix ( name = 'D' ) E = tensor . matrix ( name = 'E' ) F = ( D + E ) G = ( C + F ) mis = min_informative_str ( G ) . replace ( ' DCTB ' , '        ' ) reference = 'A. Elemwise{add,no_inplace}\n B. C\n C. Elemwise{add,no_inplace}\n  D. D\n  E. E' if ( mis != reference ) : print ( ( ( '--' + mis ) + '--' ) ) print ( ( ( '--' + reference ) + '--' ) ) assert ( mis == reference )
evaluates a reference output to make sure the min_informative_str function works as intended .