code
stringlengths
3
6.57k
w_grad.get_shape()
merge_with(w.get_shape()
nn_ops.bias_add_grad(dicfo)
b_grad.get_shape()
merge_with(b.get_shape()
ops.RegisterGradient("BlockLSTM")
_BlockLSTMGrad(op, *grad)
op.get_attr("use_peephole")
LSTMBlockCell(LayerRNNCell)
gates (see above)
super(LSTMBlockCell, self)
__init__(_reuse=reuse, name=name)
base_layer.InputSpec(ndim=2)
state_size(self)
rnn_cell_impl.LSTMStateTuple(self._num_units, self._num_units)
output_size(self)
build(self, inputs_shape)
str(inputs_shape)
init_ops.constant_initializer(0.0)
self.add_variable(self._names["wci"], [self._num_units])
self.add_variable(self._names["wcf"], [self._num_units])
self.add_variable(self._names["wco"], [self._num_units])
call(self, inputs, state)
cell (LSTM)
len(state)
ValueError("Expecting state to be a tuple with length 2.")
array_ops.zeros([self._num_units])
state (_, cs, _, _, _, _, h)
rnn_cell_impl.LSTMStateTuple(cs, h)
LSTMBlockWrapper(base_layer.Layer)
num_units(self)
cell (output dimension)
vector (tensor)
call(self, inputs, initial_state=None, dtype=None, sequence_length=None)
vector (tensor)
isinstance(inputs, list)
array_ops.stack(inputs)
inputs.get_shape()
with_rank(3)
ValueError("Expecting inputs_shape[2] to be set: %s" % inputs_shape)
array_ops.shape(inputs)
array_ops.shape(inputs)
ValueError("Either initial_state or dtype needs to be specified")
array_ops.stack([batch_size, self.num_units])
len(initial_state)
ops.convert_to_tensor(sequence_length)
array_ops.sequence_mask(sequence_length, time_len, dtype=dtype)
array_ops.expand_dims(mask, [-1])
array_ops.expand_dims(initial_cell_state, [0])
array_ops.expand_dims(initial_output, [0])
array_ops.unstack(outputs)
rnn_cell_impl.LSTMStateTuple(final_cell_state, final_output)
_gather_states(self, data, indices, batch_size)
out(i, j)
data(indices(i)
math_ops.range(batch_size)
array_ops.reshape(data, [-1, self.num_units])
LSTMBlockFusedCell(LSTMBlockWrapper)
forget_bias (default: 1)
gates (see above)
super(LSTMBlockFusedCell, self)
__init__(_reuse=reuse, name=name)
base_layer.InputSpec(ndim=3)
num_units(self)
cell (output dimension)
build(self, input_shape)
init_ops.constant_initializer(0.0)
self.add_variable("w_i_diag", [self._num_units])
self.add_variable("w_f_diag", [self._num_units])
self.add_variable("w_o_diag", [self._num_units])
vector (tensor)
state (cs)
Output (h)
inputs.get_shape()
with_rank(3)
array_ops.shape(inputs)
array_ops.zeros([self._num_units], dtype=dtype)
math_ops.to_int64(time_len)
math_ops.to_int64(math_ops.reduce_max(sequence_length)
transform(i,o)
len(line.strip()
line.strip()
split(None, 1)
trans.split()
t.startswith("<")
ntrans.append(t.lower()
print("{} {}".format(key, " ".join(ntrans)
argparse.ArgumentParser(description='')
parser.add_argument('infile', nargs='?', type=argparse.FileType('r', encoding='utf-8')
codecs.getreader('utf-8')
parser.add_argument('outfile', nargs='?', type=argparse.FileType('w', encoding='utf-8')
codecs.getwriter('utf-8')
parser.parse_args()
transform(args.infile, args.outfile)
string_to_float(val)
float(val)
compute_atom_contact(model, threshold, excluded=[])
len(chain)
np.zeros((res_count,res_count)
chain.get_residues()