Giter Club home page Giter Club logo

dmazerunner's Issues

Is it the framework doesn't support or the implementation of the model of keras model

Greetings,
I have been trying to implement my own model, but for some reason the function
"sym, params = nnvm.frontend.from_keras(model1)"
The whole code runs only this line doesn't run. and I don't get what's the error, the error window doesn't mention what is wrong just an empty window with
"Failed to download model cifar10
Error: "
and I was wondering what kind of model can be accepted. or this framework doesn't support any other model except the rebuilt in the framework.

The defined model was as followe:
if args.model == "cifar10":
model1 = keras.Sequential()
model1.add(keras.layers.Conv2D(32, (3,3), activation='relu', input_shape=(32, 32,3)))
model1.add(keras.layers.MaxPooling2D((2,2)))
model1.add(keras.layers.Conv2D(64, (3,3), activation='relu'))
model1.add(keras.layers.MaxPooling2D((2,2)))
model1.add(keras.layers.Conv2D(64, (3,3), activation='relu'))
model1.add(keras.layers.Flatten())
model1.add(keras.layers.Dense(64, activation='relu'))
model1.add(keras.layers.Dense(10))
model1.summary()
model1.load_weights('model1_weights.h5')
from PIL import Image
from keras.applications.resnet50 import preprocess_input
img_url = 'https://github.com/dmlc/mxnet.js/blob/master/data/cat.png?raw=true'
download(img_url, 'cat.png')
img = Image.open('cat.png').resize((32, 32))
# input preprocess
data = np.array(img)[np.newaxis, :].astype('float32')
data = preprocess_input(data).transpose([0, 3, 1, 2])
shape1 = (1, 3, 32, 32) #input shape; need to be obtained from the model
shape_dict = {'input_1': shape1}
sym, params = nnvm.frontend.from_keras(model1)
target = 'llvm'

arch-spec cannot be specified even though it says it's

Greetings,

Inside "dMazeRunner/examples/" you mention that you can specify the architecture by using this code
python conv.py [--arch-spec arch_spec.json]
or also this code
python gemm.py [--arch-spec arch_spec.json]
I tried to change so many parameters inside this file "arch_spec.json", and execute the commands above, but the results of EDP,Cycles, Energy are the same.

However, Inside the "dMazeRunner/scripts/run_optimizer.py" if I change any parameters inside "dMazeRunner/scripts/arch_spec.json" I will see an immediate effect on the results. while it's not the case with "dMazeRunner/examples/conv.py" or "dMazeRunner/examples/gemm.py"

Is there a bug in the code? or did I do something wrong. Can someone please fix it, or tell me how to fix it. I tried many methods including this code. where I added also "arch_basic". but I don't see any change

args = parser.parse_args() if args.arch_spec: with open(args.arch_spec) as jsonFile: # Parameters used by analytical model of dataflow execution json_data = json.load(jsonFile) env_params = json_data["arch_details"] env = expr_parameters.Environment(**env_params) # Params used by map-space generator and optimizer expr_params = json_data["arch_basic"] params = expr_parameters.ExprParameters(**expr_params) else: env = expr_parameters.Environment() params = expr_parameters.ExprParameters(env)

Thank you very much for your time.

I get c_typs error when I run any/all examples in the framework

Hi, after I installed and followed all the instructions. I now want to run the scripts.
after running this line

python run_optimizer.py --frontend mxnet --model resnet18_v1 --auto-optimize

I get this error:
Traceback (most recent call last):
File "run_optimizer.py", line 1, in
from matplotlib import pyplot as plt
File "/home/hussain/.local/lib/python3.7/site-packages/matplotlib/init.py", line 138, in
from . import cbook, rcsetup
File "/home/hussain/.local/lib/python3.7/site-packages/matplotlib/cbook/init.py", line 31, in
import numpy as np
File "/home/hussain/.local/lib/python3.7/site-packages/numpy/init.py", line 142, in
from . import core
File "/home/hussain/.local/lib/python3.7/site-packages/numpy/core/init.py", line 99, in
from . import _dtype_ctypes
File "/home/hussain/.local/lib/python3.7/site-packages/numpy/core/_dtype_ctypes.py", line 26, in
import ctypes
File "/usr/lib64/python3.7/ctypes/init.py", line 7, in
from _ctypes import Union, Structure, Array
ImportError: cannot import name 'Union' from '_ctypes' (/home/hussain/dMazeRunner/tvm/nnvm/python/nnvm/_ctypes/init.py)

Can someone please help me to solve this issue because I can't get it solved no matter what I did to the code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.