Home
last modified time | relevance | path

Searched refs:channel_axis (Results 1 – 10 of 10) sorted by relevance

/third_party/mindspore/mindspore/ops/operations/
D_quant_ops.py147 def __init__(self, ema=False, ema_decay=0.999, channel_axis=1): argument
159 …self.channel_axis = validator.check_int_range(channel_axis, 0, 1, Rel.INC_BOTH, 'channel_axis', se…
161 … self.channel_axis = validator.check_non_negative_int(channel_axis, 'channel_axis', self.name)
365 channel_axis=1): argument
377 …self.channel_axis = validator.check_int_range(channel_axis, 0, 1, Rel.INC_BOTH, 'channel_axis', se…
379 … self.channel_axis = validator.check_non_negative_int(channel_axis, 'channel_axis', self.name)
389 self.channel_axis = 0
391 …validator.check_equal_int(alpha_shape[0], input_x_shape[self.channel_axis], "alpha rank", self.nam…
423 channel_axis=1): argument
428 … self.channel_axis = validator.check_non_negative_int(channel_axis, 'channel axis', self.name)
[all …]
/third_party/mindspore/tests/st/ops/gpu/
Dtest_fake_quant_perchannel.py28 def __init__(self, num_bits=8, symmetric=False, narrow_range=False, channel_axis=1): argument
33 channel_axis=channel_axis)
49 net = Net(num_bits=8, narrow_range=False, channel_axis=0)
70 net = Net(num_bits=8, narrow_range=False, channel_axis=0)
91 net = Net(num_bits=8, narrow_range=True, channel_axis=0)
113 net = Net(num_bits=8, narrow_range=False, channel_axis=0)
134 net = Net(num_bits=8, narrow_range=True, channel_axis=0)
156 net = Net(num_bits=8, narrow_range=False, channel_axis=1)
178 net = Net(num_bits=8, narrow_range=True, channel_axis=1)
201 net = Net(num_bits=8, narrow_range=False, channel_axis=1)
[all …]
/third_party/mindspore/mindspore/ops/_op_impl/_custom_op/
Dfake_learned_scale_quant_perchannel_grad_reduce.py49 …ake_learned_scale_quant_perchannel_grad_d_reduce_compute(dout_alpha_data, dout_alpha, channel_axis, argument
55 axis.remove(channel_axis)
61 def fake_learned_scale_quant_perchannel_grad_d_reduce(dout_alpha, dalpha, channel_axis, argument
78 channel_axis, kernel_name)
Dminmax_update_perchannel.py52 ema, ema_decay, channel_axis): argument
60 if channel_axis == 0:
81 ema, ema_decay, channel_axis, argument
91 if channel_axis == 0 and x_shape[0] != min_shape[0] and x_shape[1] == min_shape[0]:
94 channel_axis_ = channel_axis
Dfake_learned_scale_quant_perchannel.py74 def fake_learned_scale_quant_perchannel_param(input_x, alpha, quant_max, channel_axis, argument
86 …if channel_axis == 0 and input_x_shape_[0] != alpha_shape[0] and input_x_shape_[1] == alpha_shape[…
89 channel_axis_ = channel_axis
119 def fake_learned_scale_quant_perchannel(input_x, alpha, quant_max, out, neg_trunc, channel_axis, argument
123 … fake_learned_scale_quant_perchannel_param(input_x, alpha, quant_max, channel_axis, kernel_name)
Dfake_quant_perchannel.py89 def fake_quant_perchannel_param(x, min_val, max_val, channel_axis, argument
101 if channel_axis == 0 and x_shape_[0] != min_shape[0] and x_shape_[1] == min_shape[0]:
104 channel_axis_ = channel_axis
130 symmetric, narrow_range, num_bits, channel_axis, argument
139 channel_axis, kernel_name)
Dfake_learned_scale_quant_perchannel_grad.py143 def fake_learned_scale_quant_perchannel_grad_d_param(input_x, alpha, quant_max, channel_axis, argument
155 …if channel_axis == 0 and input_x_shape_[0] != alpha_shape[0] and input_x_shape_[1] == alpha_shape[…
158 channel_axis_ = channel_axis
190channel_axis, kernel_name="fake_learned_scale_quant_perchannel_grad_d"): argument
193 …fake_learned_scale_quant_perchannel_grad_d_param(input_x, alpha, quant_max, channel_axis, kernel_n…
Dfake_quant_perchannel_grad.py113 def fake_quant_perchannel_grad_param(x, min_val, max_val, channel_axis, argument
125 if channel_axis == 0 and x_shape_[0] != min_shape[0] and x_shape_[1] == min_shape[0]:
128 channel_axis_ = channel_axis
154 symmetric, narrow_range, num_bits, channel_axis, argument
167 channel_axis, kernel_name)
/third_party/mindspore/mindspore/nn/layer/
Dquant.py376 channel_axis=1, argument
399 self.channel_axis = channel_axis
457 quant_fun = partial(Q.FakeQuantPerChannel, channel_axis=self.channel_axis)
458 ema_fun = partial(Q.MinMaxUpdatePerChannel, channel_axis=self.channel_axis)
508 quant_fun = partial(Q.FakeLearnedScaleQuantPerChannel, channel_axis=self.channel_axis)
552 … self.channel_axis, self.num_channels, self.quant_delay,
739 channel_axis = 0
740 self.channel_axis = channel_axis
756 channel_axis=channel_axis,
789 if self.channel_axis:
[all …]
/third_party/mindspore/mindspore/ops/_grad/
Dgrad_quant_ops.py71 channel_axis=self.channel_axis)
95 grad_dx = Q.CorrectionMulGrad(self.channel_axis)
96 grad_d_batch_std = Q.CorrectionMulGradReduce(self.channel_axis)
228 channel_axis=self.channel_axis)