forked from mindspore-Ecosystem/mindspore
!14794 fix test case bug
From: @woshixiaoli Reviewed-by: @zichun_ye,@sunnybeike Signed-off-by: @zichun_ye
This commit is contained in:
commit
018617a091
|
@ -14,13 +14,13 @@
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
"""test cases for categorical distribution"""
|
"""test cases for categorical distribution"""
|
||||||
|
|
||||||
|
import pytest
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import mindspore.context as context
|
import mindspore.context as context
|
||||||
import mindspore.nn as nn
|
import mindspore.nn as nn
|
||||||
import mindspore.nn.probability.distribution as msd
|
import mindspore.nn.probability.distribution as msd
|
||||||
from mindspore import Tensor
|
from mindspore import Tensor
|
||||||
from mindspore import dtype as ms
|
from mindspore import dtype as ms
|
||||||
import pytest
|
|
||||||
|
|
||||||
context.set_context(mode=context.GRAPH_MODE, device_target="GPU")
|
context.set_context(mode=context.GRAPH_MODE, device_target="GPU")
|
||||||
|
|
||||||
|
|
|
@ -14,13 +14,13 @@
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
"""test cases for cauchy distribution"""
|
"""test cases for cauchy distribution"""
|
||||||
|
|
||||||
|
import pytest
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import mindspore.context as context
|
import mindspore.context as context
|
||||||
import mindspore.nn as nn
|
import mindspore.nn as nn
|
||||||
import mindspore.nn.probability.distribution as msd
|
import mindspore.nn.probability.distribution as msd
|
||||||
from mindspore import Tensor
|
from mindspore import Tensor
|
||||||
from mindspore import dtype as ms
|
from mindspore import dtype as ms
|
||||||
import pytest
|
|
||||||
|
|
||||||
context.set_context(mode=context.PYNATIVE_MODE, device_target="Ascend")
|
context.set_context(mode=context.PYNATIVE_MODE, device_target="Ascend")
|
||||||
|
|
||||||
|
|
|
@ -14,12 +14,12 @@
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
"""test cases for gamma distribution"""
|
"""test cases for gamma distribution"""
|
||||||
|
|
||||||
|
import pytest
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import mindspore.context as context
|
import mindspore.context as context
|
||||||
import mindspore.nn as nn
|
import mindspore.nn as nn
|
||||||
import mindspore.nn.probability.distribution as msd
|
import mindspore.nn.probability.distribution as msd
|
||||||
from mindspore import dtype as ms
|
from mindspore import dtype as ms
|
||||||
import pytest
|
|
||||||
|
|
||||||
context.set_context(mode=context.PYNATIVE_MODE, device_target="Ascend")
|
context.set_context(mode=context.PYNATIVE_MODE, device_target="Ascend")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue