f1b19a6b67f353762025dae38c2ab9363f553930,python/dgl/heterograph.py,DGLHeteroGraph,to,#DGLHeteroGraph#Any#,4050

Before Change


        for i in range(len(self._node_frames)):
            for k in self._node_frames[i].keys():
                self._node_frames[i][k] = F.copy_to(self._node_frames[i][k], ctx)
        for i in range(len(self._edge_frames)):
            for k in self._edge_frames[i].keys():
                self._edge_frames[i][k] = F.copy_to(self._edge_frames[i][k], ctx)
        return self

    def local_var(self):
        Return a heterograph object that can be used in a local function scope.

After Change


            new_nframes.append(FrameRef(Frame(new_feats)))
        new_eframes = []
        for eframe in self._edge_frames:
            new_feats = {k : F.copy_to(feat, ctx) for k, feat in eframe.items()}
            new_eframes.append(FrameRef(Frame(new_feats)))
        // TODO(minjie): replace the following line with the commented one to enable GPU graph.
        new_gidx = self._graph
        //new_gidx = self._graph.copy_to(utils.to_dgl_context(ctx))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: dmlc/dgl
Commit Name: f1b19a6b67f353762025dae38c2ab9363f553930
Time: 2020-06-19
Author: wmjlyjemaine@gmail.com
File Name: python/dgl/heterograph.py
Class Name: DGLHeteroGraph
Method Name: to


Project Name: pantsbuild/pants
Commit Name: 0c099396ea3f96919b3e613b16b399516e446c16
Time: 2015-10-05
Author: tansy.arron@gmail.com
File Name: src/python/pants/cache/cache_setup.py
Class Name: CacheFactory
Method Name: select_best_url


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: restore


Project Name: dmlc/dgl
Commit Name: f1b19a6b67f353762025dae38c2ab9363f553930
Time: 2020-06-19
Author: wmjlyjemaine@gmail.com
File Name: python/dgl/heterograph.py
Class Name: DGLHeteroGraph
Method Name: to