Sha256: 061dd5c58e6021ba80b4360872bf7fcd36253061b253a934f356512af20800d0
Contents?: true
Size: 855 Bytes
Versions: 2
Compression:
Stored size: 855 Bytes
Contents
module TensorStream module Images extend OpHelper extend TensorStream::Utils def self.decode_png(contents, channels: 0, dtype: :uint8, name: nil, new_shape: nil) _op(:decode_png, contents, channels: channels, data_type: dtype, name: name, new_shape: new_shape) end def self.decode_jpeg(contents, channels: 0, dtype: :uint8, name: nil, new_shape: nil) _op(:decode_jpg, contents, channels: channels, data_type: dtype, name: name, new_shape: new_shape) end def self.encode_png(contents, compression: -1, name: nil, new_shape: nil, resample_method: nil) check_allowed_types(contents, %i[uint8 uint16]) contents = convert_to_tensor(contents, dtype: :uint16) _op(:encode_png, contents, compression: compression, name: name, new_shape: new_shape, resample_method: resample_method) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tensor_stream-1.0.9 | lib/tensor_stream/images.rb |
tensor_stream-1.0.8 | lib/tensor_stream/images.rb |