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

Commit

Permalink
Add license header to NAS (#1788)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuge Zhang authored Nov 26, 2019
1 parent 6b9ccd3 commit bf1c79a
Show file tree
Hide file tree
Showing 27 changed files with 79 additions and 0 deletions.
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

0 comments on commit bf1c79a

Please sign in to comment.