365f621b24631a03f995e3b30e1800d327e42fc1,keras/layers/recurrent.py,Recurrent,reset_states,#Recurrent#Any#,320

Before Change


        if not self.stateful:
            raise AttributeError("Layer must be stateful.")
        if not self.input_spec:
            raise RuntimeError("Layer has never been called "
                               "and thus has no states.")
        batch_size = self.input_spec.shape[0]
        if not batch_size:
            raise ValueError("If a RNN is stateful, it needs to know "
                             "its batch size. Specify the batch size "

After Change


                                 str(values))
            for index, (value, state) in enumerate(zip(states, self.states)):
                if value.shape != (batch_size, self.units):
                    raise ValueError("State " + str(index) +
                                     " is incompatible with layer " +
                                     self.name + ": expected shape=" +
                                     str((batch_size, self.units)) +
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: keras-team/keras
Commit Name: 365f621b24631a03f995e3b30e1800d327e42fc1
Time: 2017-04-24
Author: joshuarchin@gmail.com
File Name: keras/layers/recurrent.py
Class Name: Recurrent
Method Name: reset_states


Project Name: ray-project/ray
Commit Name: 7e52351ae56a5068131d873252ad4f95d134c33d
Time: 2021-01-05
Author: zhisbug@users.noreply.github.com
File Name: python/ray/util/collective/collective.py
Class Name:
Method Name: declare_collective_group


Project Name: microsoft/nni
Commit Name: e33b14d5f66c40356eff25056737d9ba5d8fe8ff
Time: 2019-01-11
Author: xuehui@microsoft.com
File Name: src/sdk/pynni/nni/metis_tuner/metis_tuner.py
Class Name: MetisTuner
Method Name: update_search_space