Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
nni
Commits
32e49600
Unverified
Commit
32e49600
authored
Jul 10, 2019
by
chicm-ms
Committed by
GitHub
Jul 10, 2019
Browse files
Fix flake8 scaned python errors (#1241)
parent
26f6f07f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
2 deletions
+5
-2
examples/trials/cifar10_pytorch/utils.py
examples/trials/cifar10_pytorch/utils.py
+1
-1
examples/trials/kaggle-tgs-salt/predict.py
examples/trials/kaggle-tgs-salt/predict.py
+1
-1
src/sdk/pynni/nni/curvefitting_assessor/test.py
src/sdk/pynni/nni/curvefitting_assessor/test.py
+2
-0
src/sdk/pynni/nni/smartparam.py
src/sdk/pynni/nni/smartparam.py
+1
-0
No files found.
examples/trials/cifar10_pytorch/utils.py
View file @
32e49600
...
@@ -6,8 +6,8 @@
...
@@ -6,8 +6,8 @@
import
os
import
os
import
sys
import
sys
import
time
import
time
import
math
import
torch
import
torch.nn
as
nn
import
torch.nn
as
nn
import
torch.nn.init
as
init
import
torch.nn.init
as
init
...
...
examples/trials/kaggle-tgs-salt/predict.py
View file @
32e49600
...
@@ -133,7 +133,7 @@ def generate_preds(outputs, target_size, pad_mode, threshold=0.5):
...
@@ -133,7 +133,7 @@ def generate_preds(outputs, target_size, pad_mode, threshold=0.5):
if
pad_mode
==
'resize'
:
if
pad_mode
==
'resize'
:
cropped
=
resize_image
(
output
,
target_size
=
target_size
)
cropped
=
resize_image
(
output
,
target_size
=
target_size
)
else
:
else
:
cropped
=
crop_image
_softmax
(
output
,
target_size
=
target_size
)
cropped
=
crop_image
(
output
,
target_size
=
target_size
)
pred
=
binarize
(
cropped
,
threshold
)
pred
=
binarize
(
cropped
,
threshold
)
preds
.
append
(
pred
)
preds
.
append
(
pred
)
...
...
src/sdk/pynni/nni/curvefitting_assessor/test.py
View file @
32e49600
...
@@ -15,9 +15,11 @@
...
@@ -15,9 +15,11 @@
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import
numpy
as
np
import
unittest
import
unittest
from
.curvefitting_assessor
import
CurvefittingAssessor
from
.curvefitting_assessor
import
CurvefittingAssessor
from
.model_factory
import
CurveModel
from
nni.assessor
import
AssessResult
from
nni.assessor
import
AssessResult
class
TestCurveFittingAssessor
(
unittest
.
TestCase
):
class
TestCurveFittingAssessor
(
unittest
.
TestCase
):
...
...
src/sdk/pynni/nni/smartparam.py
View file @
32e49600
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
import
random
import
random
import
numpy
as
np
from
.env_vars
import
trial_env_vars
from
.env_vars
import
trial_env_vars
from
.
import
trial
from
.
import
trial
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment