1e84cededb34347e5fd3a169b824020606f36d6c,tensorflow_datasets/core/dataset_utils.py,,dataset_as_numpy,#Any#Any#,108
Before Change
with utils.maybe_with_graph(graph, create_if_none=False):
for i, ds_el in enumerate(flat_ds):
if isinstance(ds_el, tf.data.Dataset):
ds_iters[i] = tf.compat.v1.data.make_one_shot_iterator(
ds_el).get_next()
// Then create NumPy items
// Shared session for tf.Tensor runs
with utils.nogpu_session(graph) as sess:
After Change
// Merge the datasets iterators and np array
iter_ds = iter(ds_iters)
iter_array = iter(np_arrays)
flat_np = [
next(iter_ds) if _is_ds(ds_el) else next(iter_array)
for ds_el in flat_ds
]
// Nest
return tf.contrib.framework.nest.pack_sequence_as(nested_ds, flat_np)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: tensorflow/datasets
Commit Name: 1e84cededb34347e5fd3a169b824020606f36d6c
Time: 2019-01-28
Author: epot@google.com
File Name: tensorflow_datasets/core/dataset_utils.py
Class Name:
Method Name: dataset_as_numpy
Project Name: tensorflow/models
Commit Name: df89d3e02a41e34581e8065cf5868a9570fa3010
Time: 2020-06-30
Author: bfusinska@google.com
File Name: research/delf/delf/python/training/train.py
Class Name:
Method Name: main
Project Name: OpenNMT/OpenNMT-tf
Commit Name: 71753922bd63dfa73e3b10c572f73e268b406ae6
Time: 2019-07-05
Author: guillaume.klein@systrangroup.com
File Name: opennmt/tests/model_test.py
Class Name: ModelTest
Method Name: testSequenceToSequenceWithReplaceUnknownTarget