Skip to content

Instantly share code, notes, and snippets.

@HarshSingh16
Last active February 4, 2019 21:33
Show Gist options
  • Save HarshSingh16/74af6704ea335aeecc9a6d11784f4494 to your computer and use it in GitHub Desktop.
Save HarshSingh16/74af6704ea335aeecc9a6d11784f4494 to your computer and use it in GitHub Desktop.
Pre-processing the targets
#Pre-processing the targets
def preprocess_targets():
left_side=tf.fill([batch_size,1],word2int["<SOS>"])
right_side=tf.strided_slice(targets,[0,0],[0,-1],[1,1])
preprocessed_targets=tf.concat([left_side,right_side],1)
return preprocessed_targets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment