Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Add license header to NAS #1788

Merged
merged 2 commits into from
Nov 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions examples/nas/darts/datasets.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

import numpy as np
import torch
from torchvision import transforms
Expand Down
3 changes: 3 additions & 0 deletions examples/nas/darts/model.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

import torch
import torch.nn as nn

Expand Down
3 changes: 3 additions & 0 deletions examples/nas/darts/ops.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

import torch
import torch.nn as nn

Expand Down
3 changes: 3 additions & 0 deletions examples/nas/darts/retrain.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

import logging
import time
from argparse import ArgumentParser
Expand Down
3 changes: 3 additions & 0 deletions examples/nas/darts/search.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

import logging
import time
from argparse import ArgumentParser
Expand Down
3 changes: 3 additions & 0 deletions examples/nas/darts/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

def accuracy(output, target, topk=(1,)):
""" Computes the precision@k for the specified values of k """
maxk = max(topk)
Expand Down
3 changes: 3 additions & 0 deletions examples/nas/enas/datasets.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

from torchvision import transforms
from torchvision.datasets import CIFAR10

Expand Down
3 changes: 3 additions & 0 deletions examples/nas/enas/macro.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

import torch.nn as nn

from nni.nas.pytorch import mutables
Expand Down
3 changes: 3 additions & 0 deletions examples/nas/enas/micro.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

import torch
import torch.nn as nn
import torch.nn.functional as F
Expand Down
3 changes: 3 additions & 0 deletions examples/nas/enas/ops.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

import torch
import torch.nn as nn

Expand Down
3 changes: 3 additions & 0 deletions examples/nas/enas/search.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

import logging
import time
from argparse import ArgumentParser
Expand Down
3 changes: 3 additions & 0 deletions examples/nas/enas/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

import torch


Expand Down
3 changes: 3 additions & 0 deletions src/sdk/pynni/nni/nas/pytorch/base_mutator.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

import logging

import torch.nn as nn
Expand Down
3 changes: 3 additions & 0 deletions src/sdk/pynni/nni/nas/pytorch/base_trainer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

from abc import ABC, abstractmethod


Expand Down
3 changes: 3 additions & 0 deletions src/sdk/pynni/nni/nas/pytorch/callbacks.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

import logging
import os

Expand Down
3 changes: 3 additions & 0 deletions src/sdk/pynni/nni/nas/pytorch/darts/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

from .mutator import DartsMutator
from .trainer import DartsTrainer
3 changes: 3 additions & 0 deletions src/sdk/pynni/nni/nas/pytorch/darts/mutator.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

import logging

import torch
Expand Down
3 changes: 3 additions & 0 deletions src/sdk/pynni/nni/nas/pytorch/darts/trainer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

import copy
import logging

Expand Down
3 changes: 3 additions & 0 deletions src/sdk/pynni/nni/nas/pytorch/enas/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

from .mutator import EnasMutator
from .trainer import EnasTrainer
3 changes: 3 additions & 0 deletions src/sdk/pynni/nni/nas/pytorch/enas/mutator.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

import torch
import torch.nn as nn
import torch.nn.functional as F
Expand Down
3 changes: 3 additions & 0 deletions src/sdk/pynni/nni/nas/pytorch/enas/trainer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

import logging
import torch
import torch.optim as optim
Expand Down
3 changes: 3 additions & 0 deletions src/sdk/pynni/nni/nas/pytorch/fixed.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

import json

import torch
Expand Down
3 changes: 3 additions & 0 deletions src/sdk/pynni/nni/nas/pytorch/mutables.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

import logging

import torch.nn as nn
Expand Down
3 changes: 3 additions & 0 deletions src/sdk/pynni/nni/nas/pytorch/mutator.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

import logging

import torch
Expand Down
1 change: 1 addition & 0 deletions src/sdk/pynni/nni/nas/pytorch/pdarts/trainer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

import json
import logging

Expand Down
3 changes: 3 additions & 0 deletions src/sdk/pynni/nni/nas/pytorch/trainer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

import json
import logging
from abc import abstractmethod
Expand Down
3 changes: 3 additions & 0 deletions src/sdk/pynni/nni/nas/pytorch/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

from collections import OrderedDict

_counter = 0
Expand Down