4630405d8134201e03780a9fb74878e6d39763ee,artificial_neural_networks/network.py,Network,_build_ann,#Network#,53
Before Change
hidden_neurons = 2 * (len(self.inputs) + len(self.languages)) / 3
self._net = theanets.Classifier([len(self.inputs),
{"size": int(hidden_neurons), "activation": "tanh"},
len(self.languages)])
After Change
self._net.add(Dense(int(hidden_neurons), activation="tanh"))
self._net.add(Dense(len(self.languages), activation="softmax"))
self._net.compile(
loss="categorical_crossentropy", optimizer=Adam(learning_rate=0.01)
)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 2
Instances
Project Name: thoughtfulml/examples-in-python
Commit Name: 4630405d8134201e03780a9fb74878e6d39763ee
Time: 2020-07-20
Author: matt@matthewkirk.com
File Name: artificial_neural_networks/network.py
Class Name: Network
Method Name: _build_ann
Project Name: uber/pyro
Commit Name: 2d9594cde89a9c1bedcf2b7a7716ad0fcd1ab01d
Time: 2019-11-14
Author: fritzo@uber.com
File Name: tests/infer/test_autoguide.py
Class Name:
Method Name: test_quantiles
Project Name: uber/pyro
Commit Name: 2d9594cde89a9c1bedcf2b7a7716ad0fcd1ab01d
Time: 2019-11-14
Author: fritzo@uber.com
File Name: tests/infer/test_autoguide.py
Class Name:
Method Name: test_median