@@ -349,7 +349,7 @@ def embedding(x,
349349    # On the backwards pass, we want to convert the gradient from 
350350    # an indexed-slices to a regular tensor before sending it back to the 
351351    # parameter server. This avoids excess computation on the parameter server. 
352-     if  not  tf .contrib . eager . in_eager_mode ():
352+     if  not  tf .executing_eagerly ():
353353      embedding_var  =  convert_gradient_to_tensor (embedding_var )
354354    x  =  dropout_no_scaling (x , 1.0  -  symbol_dropout_rate )
355355    emb_x  =  gather (embedding_var , x , dtype )
@@ -2868,7 +2868,7 @@ def ones_matrix_band_part(rows, cols, num_lower, num_upper, out_shape=None):
28682868def  reshape_like_all_dims (a , b ):
28692869  """Reshapes a to match the shape of b.""" 
28702870  ret  =  tf .reshape (a , tf .shape (b ))
2871-   if  not  tf .contrib . eager . in_eager_mode ():
2871+   if  not  tf .executing_eagerly ():
28722872    ret .set_shape (b .get_shape ())
28732873  return  ret 
28742874
@@ -3193,7 +3193,7 @@ def should_generate_summaries():
31933193def  reshape_like (a , b ):
31943194  """Reshapes a to match the shape of b in all but the last dimension.""" 
31953195  ret  =  tf .reshape (a , tf .concat ([tf .shape (b )[:- 1 ], tf .shape (a )[- 1 :]], 0 ))
3196-   if  not  tf .contrib . eager . in_eager_mode ():
3196+   if  not  tf .executing_eagerly ():
31973197    ret .set_shape (b .get_shape ().as_list ()[:- 1 ] +  a .get_shape ().as_list ()[- 1 :])
31983198  return  ret 
31993199
@@ -3205,7 +3205,7 @@ def summarize_video(video, prefix, max_outputs=1):
32053205    raise  ValueError ("Assuming videos given as tensors in the format " 
32063206                     "[batch, time, height, width, channels] but got one " 
32073207                     "of shape: %s"  %  str (video_shape ))
3208-   if  tf .contrib . eager . in_eager_mode ():
3208+   if  tf .executing_eagerly ():
32093209    return 
32103210  if  video .get_shape ().as_list ()[1 ] is  None :
32113211    tf .summary .image (
0 commit comments