This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ..DNAS.search_space import SearchSpace | |
from ..DNAS.modules import ReshapeFC, Identity, Resizer, ConvBlock1D, SinBlock, ConvBlock2D, ConvChannel2D | |
from ..DNAS.modules import Resizer, MixedOp | |
from ..DNAS.super_net import DNAS | |
from ..fermi_datasets import FashionMNISTDataModule | |
from ..DNAS.entryNode import DataModuleWrapper | |
import pytorch_lightning as pl | |
from pytorch_lightning import seed_everything |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example/Test Case | |
def test_reverse_arg_dict_multi(capsys): | |
def dummy_func(a, b=1, c=2, d=3): | |
assert a == 10 | |
assert b == 20 | |
assert c == 30 | |
assert d == 40 | |
arg_tester = ArgDict() | |
arg_tester.append(10, 20) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Assume Initialized memory allocators | |
// Create a 2x2 Tensor from data owned by the user | |
int8_t my_input_buffer[4] = {1, 2, 3, 4}; | |
Tensor a = new BufferTensor({2, 2}, i8, my_input_buffer); | |
// Update a value in our buffer. | |
my_input_buffer[3] = 5; | |
// Create Tensors of int8_t from const static arrays in ROM | |
Tensor b = new RomTensor({2, 2}, i8, array_of_values_b); |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "models/deep_mlp.hpp" //gernerated model file | |
#include "tensor.hpp" //useful tensor classes | |
#include "mbed.h" | |
#include <stdio.h> | |
#include "input_data.h" //contains the first sample taken from the MNIST test set | |
Serial pc(USBTX, USBRX, 115200); //baudrate := 115200 | |
int main(void) { | |
printf("Simple MNIST end-to-end uTensor cli example (device)\n"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const float input_data [ 784 ] = { 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0. |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf8 -*- | |
""" | |
# This script is based on: | |
# https://www.tensorflow.org/get_started/mnist/pros | |
# see https://github.com/uTensor/utensor-mnist-demo | |
""" | |
from __future__ import print_function | |
import argparse | |
import sys |