lib/torch.rb in torch-rb-0.3.3 vs lib/torch.rb in torch-rb-0.3.4
- old
+ new
@@ -469,9 +469,14 @@
input = input.view(input.shape[-signal_dim..-1])
end
_stft(input, n_fft, hop_length, win_length, window, normalized, onesided)
end
+ def clamp(tensor, min, max)
+ tensor = _clamp_min(tensor, min)
+ _clamp_max(tensor, max)
+ end
+
private
def to_ivalue(obj)
case obj
when String