Created
March 10, 2019 05:45
-
-
Save jamesr66a/21fc5f0d407ac80d779d661560467710 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
def tf__RNN(x, weights, biases): | |
try: | |
with ag__.function_scope('RNN'): | |
do_return = False | |
retval_ = None | |
x = ag__.converted_call('unstack', tf, ag__.ConversionOptions(recursive=True, verbose=0, strip_decorators=(ag__.convert, ag__.do_not_convert, ag__.converted_call), force_conversion=False, optional_features=ag__.Feature.ALL, internal_convert_user_code=True), (x, timesteps, 1), {}) | |
lstm_cell = ag__.converted_call(LSTMCell, None, ag__.ConversionOptions(recursive=True, verbose=0, strip_decorators=(ag__.convert, ag__.do_not_convert, ag__.converted_call), force_conversion=False, optional_features=ag__.Feature.ALL, internal_convert_user_code=True), (num_hidden,), {'forget_bias': 1.0}) | |
outputs, states = ag__.converted_call(static_rnn, None, ag__.ConversionOptions(recursive=True, verbose=0, strip_decorators=(ag__.convert, ag__.do_not_convert, ag__.converted_call), force_conversion=False, optional_features=ag__.Feature.ALL, internal_convert_user_code=True), (lstm_cell, x), {'dtype': tf.float32}) | |
do_return = True | |
retval_ = ag__.converted_call('matmul', tf, ag__.ConversionOptions(recursive=True, verbose=0, strip_decorators=(ag__.convert, ag__.do_not_convert, ag__.converted_call), force_conversion=False, optional_features=ag__.Feature.ALL, internal_convert_user_code=True), (ag__.get_item(outputs, ag__.u_sub(1), opts=ag__.GetItemOpts(element_dtype=None)), ag__.get_item(weights, 'out', opts=ag__.GetItemOpts(element_dtype=None))), {}) + ag__.get_item(biases, 'out', opts=ag__.GetItemOpts(element_dtype=None)) | |
return retval_ | |
except: | |
ag__.rewrite_graph_construction_error(ag_source_map__) | |
tf__RNN.autograph_info__ = {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment