Sha256: 2de7b482fd4bfc56640c2d925def624985b25867a438d4cf1a2b6ad42e0afeda
Contents?: true
Size: 982 Bytes
Versions: 1
Compression:
Stored size: 982 Bytes
Contents
# keep in alphabetical order module TensorFlow module Ops def eye(num_rows, num_columns: nil) num_columns ||= num_rows zeros = self.zeros([num_rows, num_columns]) ones = self.ones([num_rows]) RawOps.matrix_set_diag(input: zeros, diagonal: ones) end def fill(dims, value) RawOps.fill(dims: dims, value: value) end def identity(input) RawOps.identity(input: input) end def matmul(a, b) RawOps.mat_mul(a: a, b: b) end def ones(dims) fill(dims, 1) end def range(start, limit = nil, delta = 1) unless limit limit = start start = 0 end RawOps.range(start: start, limit: limit, delta: delta) end def timestamp RawOps.timestamp end def transpose(x, perm: [1, 0]) RawOps.transpose(x: x, perm: perm) end def zeros(dims) fill(dims, 0) end def zeros_like(x) RawOps.zeros_like(x: x) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tensorflow-0.1.1 | lib/tensorflow/ops.rb |