4704e86551c33ebfdf6e2227c350014a8d06c116,paysage/models/model_utils.py,ComputationGraph,set_trainable_layers,#ComputationGraph#Any#,593
Before Change
None
for layer_index in range(self.num_layers):
self.layer_connections[layer_index].trainable = (layer_index in trainable_layers)
// if the layer is not trainable, set the weights as untrainable
if not self.layer_connections[layer_index].trainable:
for weight_index in self.layer_connections[layer_index].left_connected_weights:
self.weight_connections[weight_index].trainable = False
def set_excluded_layers(self, excluded_layers):
Convenience function to set the excluded layers.
Sets exactly the given layers as excluded (e.g. unexcludes any others).
After Change
self.trainable_layers = trainable_layers
// set weights where an untrainable layer is a higher index to untrainable
untrainable_layers = list(set(range(len())) - set(trainable_layers))
untrainable_weights = []
for weight_index in self.weight_connections:
if weight_index[1] in untrainable_layers:
untrainable_weights.append(weight_index)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 10
Instances Project Name: drckf/paysage
Commit Name: 4704e86551c33ebfdf6e2227c350014a8d06c116
Time: 2017-05-17
Author: jrwalsh1@gmail.com
File Name: paysage/models/model_utils.py
Class Name: ComputationGraph
Method Name: set_trainable_layers
Project Name: drckf/paysage
Commit Name: 4704e86551c33ebfdf6e2227c350014a8d06c116
Time: 2017-05-17
Author: jrwalsh1@gmail.com
File Name: paysage/models/model_utils.py
Class Name: ComputationGraph
Method Name: set_trainable_layers
Project Name: drckf/paysage
Commit Name: 1fa77c2ca2daa62ecad77dd0d6ba5e1f7b025cd8
Time: 2017-05-17
Author: jrwalsh1@gmail.com
File Name: paysage/models/model_utils.py
Class Name: ComputationGraph
Method Name: set_trainable_layers
Project Name: deepchem/deepchem
Commit Name: 4270c3dae0b80b384c4a0026e2043345904b4fe5
Time: 2016-08-31
Author: bharath.ramsundar@gmail.com
File Name: deepchem/featurizers/atomic_coordinates.py
Class Name: NeighborListAtomicCoordinates
Method Name: _featurize