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)
def print_tensor(x, message=""):
After Change
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)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
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: MorvanZhou/tutorials
Commit Name: 45a1d730e78a711132dbf16e856c32e5711d7f12
Time: 2017-02-21
Author: morvanzhou@hotmail.com
File Name: Reinforcement_learning_TUT/6_OpenAI_gym/RL_brain.py
Class Name: DeepQNetwork
Method Name: _replace_target_params
Project Name: MorvanZhou/tutorials
Commit Name: 45a1d730e78a711132dbf16e856c32e5711d7f12
Time: 2017-02-21
Author: morvanzhou@hotmail.com
File Name: Reinforcement_learning_TUT/5_Deep_Q_Network/RL_brain.py
Class Name: DeepQNetwork
Method Name: _replace_target_params