8202e627c7d7897728d824c84a6d479ca84a9098,keras/backend/cntk_backend.py,,slice,#,2579

Before Change




def slice(x, start, size):
    raise NotImplementedError


def _reshape_batch(x, shape):
    // there is a bug in cntk 2.1"s unpack_batch implementation

After Change


def slice(x, start, size):
    if not (len(int_shape(x)) == len(start) == len(size)):
        raise ValueError("The dimension and the size of indices should match.")
    out = x[tuple([py_slice(i, i + j) for (i, j) in zip(start, size)])]
    out._keras_shape = tuple(size)
    return out

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: keras-team/keras
Commit Name: 8202e627c7d7897728d824c84a6d479ca84a9098
Time: 2019-03-25
Author: me@taehoonlee.com
File Name: keras/backend/cntk_backend.py
Class Name:
Method Name: slice


Project Name: keras-team/keras
Commit Name: 8202e627c7d7897728d824c84a6d479ca84a9098
Time: 2019-03-25
Author: me@taehoonlee.com
File Name: keras/backend/theano_backend.py
Class Name:
Method Name: slice


Project Name: nilmtk/nilmtk
Commit Name: 0d65a28dfb42b229e71f63e606e78b36bf2e42d3
Time: 2014-12-21
Author: jack-list@xlk.org.uk
File Name: nilmtk/metergroup.py
Class Name: MeterGroup
Method Name: plot_multiple