for pylint 3rd

This commit is contained in:
z00478463 2020-05-22 15:17:15 +08:00
parent d6bed5452e
commit 80b738b0da
7 changed files with 9 additions and 8 deletions

View File

@ -12,8 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
from mindspore.ops.op_info_register import op_info_register
"""batch_matmul_impl"""
from mindspore.ops.op_info_register import op_info_register
@op_info_register("""{
"op_name": "CusBatchMatMul",

View File

@ -12,8 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
from mindspore.ops.op_info_register import op_info_register
"""CusCholeskyTrsm"""
from mindspore.ops.op_info_register import op_info_register
@op_info_register("""{
"op_name": "CusCholeskyTrsm",

View File

@ -109,4 +109,5 @@ NoneType = type(None)
}""")
def CusMatMulCubeFraczRightMul(input_x1, input_x2, input_x3, bias=None, output_y={}, trans_a=False, trans_b=False,
kernel_name="matmulcube"):
"""CusMatMulCubeFraczRightMul"""
return

View File

@ -530,7 +530,7 @@ class Model:
valid_dataset (Dataset): Dataset to evaluate the model.
list_callback (ListCallback): Executor of callback list. Default: None.
cb_params (_InternalCallbackParam): Callback parameters. Default: None.
Returns:
Dict, returns the loss value & metrics values for the model in test mode.
"""

View File

@ -126,7 +126,7 @@ def _bn_last(channel):
def _fc(in_channel, out_channel, damping, loss_scale, frequency):
weight_shape = (out_channel, in_channel)
weight = Tensor(kaiming_uniform(weight_shape, a=math.sqrt(5))
return Dense_Thor(in_channel, out_channel, has_bias=False, weight_init=weight,
return Dense_Thor(in_channel, out_channel, has_bias=False, weight_init=weight, \
bias_init=0, damping=damping, loss_scale=loss_scale, frequency=frequency)

View File

@ -196,7 +196,7 @@ class Conv2d_Thor(_Conv):
self.channels_slice_flag = True
self.padA_flag = False
if (self.matrix_A_dim // self.diag_block_dim) * self.diag_block_dim != self.matrix_A_dim
if (self.matrix_A_dim // self.diag_block_dim) * self.diag_block_dim != self.matrix_A_dim \
and self.matrix_A_dim > self.diag_block_dim:
self.padA_flag = True
pad_dim = self.diag_block_dim - self.matrix_A_dim % self.diag_block_dim

View File

@ -82,9 +82,9 @@ def get_second_order_damping(global_step, damping_init, decay_rate, total_epochs
current_step = global_step
damping_each_step = np.array(damping_each_step).astype(np.float32)
damping = damping_each_step[current_step:]
print("damping_is=========", damping)
return damping
damping_now = damping_each_step[current_step:]
print("damping_is=========", damping_now)
return damping_now
if __name__ == '__main__':