code stringlengths 3 6.57k |
|---|
self.predict(x) |
np.squeeze(y, axis=2) |
Evaluator.evaluate(m, y, y_pred) |
np.array([Evaluator.evaluate(m, y[:, i, :], y_pred[:, i, :]) |
range(self.future_seq_len) |
predict(self, x, mc=False) |
y (expected dimension = 2) |
self._decode_sequence(x, mc=mc) |
np.squeeze(y_pred, axis=2) |
predict_with_uncertainty(self, x, n_iter=100) |
np.array([self.predict(x, mc=True) |
range(n_iter) |
result.mean(axis=0) |
result.var(axis=0) |
save(self, model_path, config_path) |
self.model.save(model_path) |
save_config(config_path, config_to_save) |
restore(self, model_path, **config) |
keras.models.load_model(model_path) |
self._restore_model() |
self.model.load_weights(file_path) |
_get_required_parameters(self) |
_get_optional_parameters(self) |
LSTM(name_, inputTensor_, numberOfOutputs_, isTraining_, dropoutProb_=None) |
tf.name_scope(name_) |
tf.cond(isTraining_, lambda: 0.5, lambda: 1.0) |
tf.nn.rnn_cell.LSTMStateTuple( tf.placeholder(layerSettings.FLOAT_TYPE, [None, numberOfOutputs_]) |
tf.placeholder(layerSettings.FLOAT_TYPE, [None, numberOfOutputs_]) |
tf.trainable_variables() |
if ('bias' not in eachVariable.name) |
and(layerSettings.REGULARIZER_WEIGHTS_DECAY != None) |
L2_Regularizer(eachVariable) |
tf.losses.add_loss(regularizationLoss, loss_collection=tf.GraphKeys.REGULARIZATION_LOSSES) |
Copyright (c) |
line (optional) |
key (e.g. Ctrl-C) |
initially (optional) |
initially (optional) |
initially (optional) |
item (optional) |
re.compile( r'(.*) |
re.compile( r'(.*) |
__init__ ( self, desc, owner, popup = False, window = None ) |
getattr( owner, 'call_menu', None ) |
desc.split( '\n' ) |
wx.Menu() |
self.parse( menu, -1 ) |
wx.MenuBar() |
self.parse( menu, -1 ) |
window.SetMenuBar( menu ) |
len( self.keys ) |
window.SetAcceleratorTable( wx.AcceleratorTable( self.keys ) |
parse ( self, menu, indent ) |
len( self.desc ) |
dline.lstrip() |
len( dline ) |
len( line ) |
if (line == '') |
or (line[0:1] == '#') |
menu.AppendSeparator() |
string (if any) |
help_pat.search( line ) |
match.group(2) |
strip() |
match.group(1) |
match.group(3) |
line.find( ':' ) |
strip() |
self.indirect( cur_id, handler ) |
exec ('def handler(event,self=self.owner) |
handler(event,self=self.owner) |
self.get_body( indented ) |
globals() |
wx.EVT_MENU( self.window, cur_id, handler ) |
options_pat.search( line ) |
match.group(1) |
match.group(3) |
match.group(2) |
strip() |
setattr( self.owner, name, MakeMenuItem( self, cur_id ) |
line.strip() |
label.find( '|' ) |
strip() |
strip() |
key.upper() |
key.find( '-' ) |
get( key[ : col ].strip() |
strip() |
key_map.get( key, None ) |
ord( key ) |
wx.AcceleratorEntry( flag, code, cur_id ) |
menu.Append( cur_id, label, help, not_checked or checked ) |
menu.Check( cur_id, True ) |
menu.Enable( cur_id, False ) |
wx.Menu() |
line.strip() |
self.parse( submenu, indented ) |
menu.AppendMenu( cur_id, label, submenu, help ) |
menu.Append( submenu, label ) |
get_body ( self, indent ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.