b6d23b2e2dfc90480519ab52047006b1936fda02,keras/backend/tensorflow_backend.py,,batch_set_value,#Any#,865
Before Change
`value` should be a Numpy array.
"""
if tuples:
ops = [tf.assign(x, np.asarray(value)) for x, value in tuples]
get_session().run(ops)
After Change
if tuples:
assign_ops = []
feed_dict = {}
for x, value in tuples:
value = np.asarray(value)
tf_dtype = _convert_string_dtype(x.dtype.name.split("_")[0])
assign_placeholder = tf.placeholder(tf_dtype, shape=value.shape)
assign_ops.append(x.assign(assign_placeholder))
feed_dict[assign_placeholder] = value
get_session().run(assign_ops, feed_dict=feed_dict)
def print_tensor(x, message=""):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: keras-team/keras
Commit Name: b6d23b2e2dfc90480519ab52047006b1936fda02
Time: 2016-07-28
Author: jer.despraz@gmail.com
File Name: keras/backend/tensorflow_backend.py
Class Name:
Method Name: batch_set_value
Project Name: NervanaSystems/coach
Commit Name: b1e9ea48d86807382c5feca0d18a6bf71f5caa03
Time: 2019-01-03
Author: gouravr@amazon.com
File Name: rl_coach/architectures/tensorflow_components/savers.py
Class Name: GlobalVariableSaver
Method Name: __init__
Project Name: NervanaSystems/coach
Commit Name: 619ea0944e1f652a426045038ee2977996733758
Time: 2019-01-02
Author: gouravr@amazon.com
File Name: rl_coach/architectures/tensorflow_components/savers.py
Class Name: GlobalVariableSaver
Method Name: restore