nervanasystems / modelzoo Goto Github PK
View Code? Open in Web Editor NEWneon model zoo
License: Apache License 2.0
neon model zoo
License: Apache License 2.0
Shouldn't the VGG weights be licensed as CC attribution instead of non commercial (as per the VGG + Caffe model licenses)?
(neon) :~/Documents/ModelZoo/TransferLearning/PASCALVOC$ ./transfer_learning.py -e10 -r13 -b mkl --save_path model.prm --serialize 1 --history 20
2018-04-13 07:06:32,066 - neon.optimizers.optimizer - WARNING - This functionality will be removed from Schedule in the future. Please use the StepSchedule class instead.
2018-04-13 07:06:32,066 - neon.backends - WARNING - deterministic_update and deterministic args are deprecated in favor of specifying random seed
prepare PASCAL VOC trainval from year 2007: add flipped image False and overlap threshold 0.5
Backend batchsize is changed to be 64 from PASCAL_VOC dataset
ROI dataset loaded from file /home/user/nervana/data/VOCdevkit/VOC2007/train_voc_2007_trainval_flip_False_ovlp_0.5_size_1000_600_v2.pkl
trainval Datatset: # images:5000
Loading the Alexnet pre-trained with ImageNet I1K from: /home/user/nervana/data/alexnet.p
Loading weights for:Convolution_bias_0 [src: Convolution_0]
Traceback (most recent call last):
File "./transfer_learning.py", line 640, in
main()
File "./transfer_learning.py", line 75, in main
load_imagenet_weights(model, args.data_dir)
File "./transfer_learning.py", line 207, in load_imagenet_weights
layer.load_weights(ps, load_states=True)
File "/home/user/anaconda2/envs/neon/lib/python3.6/site-packages/nervananeon-2.6.0-py3.6.egg/neon/layers/layer.py", line 249, in load_weights
self.set_params(pdict)
File "/home/user/anaconda2/envs/neon/lib/python3.6/site-packages/nervananeon-2.6.0-py3.6.egg/neon/layers/layer.py", line 1028, in set_params
assert self.weight_bias is not None
AssertionError
Please guide me, Thanks.
I try to get output of googlenet with some randomly generated inputs using a modified version of googlenet_neon.py. I get warning and error messages below. Did I made some mistake or is there a bug? The code that I use is below error messages.
Messages:
2016-04-11 20:42:40,144 - neon.models.model - WARNING - Problems restoring existing RNG state: algorithm must be 'MT19937'
Traceback (most recent call last):
File "/home/iaroslav/neon-examples/googlenet/demo.py", line 103, in <module>
model.initialize(test, cost)
File "/usr/local/lib/python2.7/dist-packages/neon/models/model.py", line 100, in initialize
prev_input = self.layers.configure(prev_input)
File "/usr/local/lib/python2.7/dist-packages/neon/layers/container.py", line 257, in configure
self.layers[0].configure(in_obj)
File "/usr/local/lib/python2.7/dist-packages/neon/layers/container.py", line 127, in configure
in_obj = l.configure(in_obj)
File "/usr/local/lib/python2.7/dist-packages/neon/layers/layer.py", line 615, in configure
assert isinstance(self.in_shape, tuple)
AssertionError
The code:
https://gist.github.com/iaroslav-ai/949ee0200152236937c4d0b29f70f70e
Assume that googlenet model is located at /home/iaroslav/temp/googlenet.p.
I run the Transfer learning code.
How to visualize the exact result of this code? meaning in paper.
thanks.
Currently all the scripts I saw only do evaluation of the pretrained model on the test set of the dataset they were trained on and output performance metric numbers in the end.
In addition to this, it would be really nice to have a python code which takes custom inputs (e.g. some image) and shows outputs of the pretrained NN (e.g. top 5 classes predicted by VGG or caption for an image). Such code can be incredibly fun to play with, help to learn neon and can be really helpful with fast model deployment. I really enjoyed for example this demo: https://github.com/NervanaSystems/neon/tree/master/examples/imdb.
Hey there I am playing around with the "cifar10_msra.py" example and ran into a snag running the Imageloading
In [15]: train = ImageLoader(set_name='train', shuffle=True, do_transforms=True, **imgset_options)
libdc1394 error: Failed to initialize libdc1394
---------------------------------------------------------------------------
ArgumentError Traceback (most recent call last)
<ipython-input-15-c033fd957d22> in <module>()
----> 1 train = ImageLoader(set_name='train', shuffle=True, do_transforms=True, **imgset_options)
/usr/local/lib/python2.7/dist-packages/neon/data/imageloader.pyc in __init__(self, repo_dir, inner_size, scale_range, do_transforms, rgb, shuffle, set_name, subset_pct, nlabels, macro, contrast_range, aspect_ratio)
105 target_size=1, reshuffle=shuffle,
106 nclasses=self.nclass,
--> 107 subset_percent=subset_pct)
108
109 def configure(self, repo_dir, set_name, subset_pct):
/usr/local/lib/python2.7/dist-packages/neon/data/dataloader.pyc in __init__(self, set_name, repo_dir, media_params, target_size, index_file, shuffle, reshuffle, datum_dtype, target_dtype, onehot, nclasses, subset_percent, ingest_params)
85 self.ingest_params = ingest_params
86 self.load_library()
---> 87 self.alloc()
88 self.start()
89 atexit.register(self.stop)
/usr/local/lib/python2.7/dist-packages/neon/data/dataloader.pyc in alloc(self)
110 return BufferPair(ct_cast(buffers, 0), ct_cast(buffers, 1))
111
--> 112 self.data = alloc_bufs(self.datum_size, self.datum_dtype)
113 self.targets = alloc_bufs(self.target_size, self.target_dtype)
114 self.device_params = DeviceParams(self.be.device_type,
/usr/local/lib/python2.7/dist-packages/neon/data/dataloader.pyc in alloc_bufs(dim0, dtype)
102
103 def alloc_bufs(dim0, dtype):
--> 104 return [self.be.iobuf(dim0=dim0, dtype=dtype) for _ in range(2)]
105
106 def ct_cast(buffers, idx):
/usr/local/lib/python2.7/dist-packages/neon/backends/backend.pyc in iobuf(self, dim0, x, dtype, name, persist_values, shared, parallelism)
549
550 if persist_values and shared is None:
--> 551 out_tsr[:] = 0
552
553 return out_tsr
/usr/local/lib/python2.7/dist-packages/neon/backends/nervanagpu.pyc in __setitem__(self, index, value)
178 def __setitem__(self, index, value):
179
--> 180 self.__getitem__(index)._assign(value)
181
182 def __getitem__(self, index):
/usr/local/lib/python2.7/dist-packages/neon/backends/nervanagpu.pyc in _assign(self, value)
339 if self.dtype.itemsize == 1:
340 drv.memset_d8_async(
--> 341 self.gpudata, unpack_from('B', value)[0], self.size, stream)
342 elif self.dtype.itemsize == 2:
343 drv.memset_d16_async(
ArgumentError: Python argument types in
pycuda._driver.memset_d8_async(NoneType, int, int, NoneType)
did not match C++ signature:
memset_d8_async(unsigned long long dest, unsigned char data, unsigned int size, pycudaboost::python::api::object stream=None)
Any ideas what I could be doing wrong here?
Is there a way to convert the pretrained deep speech model, or any model of neons, to a model compatible with tensorflow?
The following instruction ion the Deepspeech README.md
file references an internal git repository:
For complete instructions on preparing datasets and/or training the model, refer to the README in our deepspeech repository.
Hello,
I downloaded the Deep Speech model from https://s3-us-west-1.amazonaws.com/nervana-modelzoo/Deep_Speech/Librispeech/librispeech_16_epochs.prm
per the following the instructions at: https://github.com/NervanaSystems/deepspeech.
However, I cannot load the model in??
In [1]: import os
...: import numpy as np
...: import pickle as pkl
...:
...: import json
...: # from aeon import DataLoader
...: from aeon.dataloader import DataLoader
...: from neon.backends import gen_backend
...: from neon.util.argparser import NeonArgparser, extract_valid_args
...: from neon.models import Model
...: from neon.data.dataloader_transformers import TypeCast, Retuple
...:
...: from decoder import ArgMaxDecoder
...: from utils import get_wer
...:
DISPLAY:neon:mklEngine.so not found; falling back to cpu backend
In [2]: model_file = 'librispeech_16_epochs.prm'
In [3]: Model(model_file)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-3-476a66425bb7> in <module>()
----> 1 Model(model_file)
/Users/kni/Tools/miniconda3/envs/neon-2.7/lib/python2.7/site-packages/neon-2.1.0-py2.7.egg/neon/models/model.pyc in __init__(self, layers, dataset, weights_only, name, optimizer)
70 self.deserialize(layers, load_states=(not weights_only))
71 elif isinstance(layers, (str, bytes)):
---> 72 self.load_params(layers, load_states=(not weights_only))
73 else:
74 # Wrap the list of layers in a Sequential container if a raw list of layers
/Users/kni/Tools/miniconda3/envs/neon-2.7/lib/python2.7/site-packages/neon-2.1.0-py2.7.egg/neon/models/model.pyc in load_params(self, param_path, load_states)
412 states as well
413 """
--> 414 self.deserialize(load_obj(param_path), load_states=load_states)
415 logger.info('Model weights loaded from %s', param_path)
416
/Users/kni/Tools/miniconda3/envs/neon-2.7/lib/python2.7/site-packages/neon-2.1.0-py2.7.egg/neon/models/model.pyc in deserialize(self, model_dict, data, load_states)
463 if 'backend' in model_dict:
464 if 'compat_mode' in model_dict['backend']:
--> 465 self.be.compat_mode = model_dict['backend']['compat_mode']
466 else:
467 model_dict['backend'] = {}
AttributeError: 'NoneType' object has no attribute 'compat_mode'
Could you add a code which extracts VGG features from images for image captioning task? This would be a nice starting point if someone wants to try playing with tuning the image captioning setup or just obtain image captions.
The https://github.com/NervanaSystems/ModelZoo/tree/master/NLP/readme.md file includes a link to:
<
[IMDB](./IMDB)
, but the link is broken and causes a 404 File not found error.
The link should be updated to the updated location at:
<
[IMDB](./SentimentClassification/IMDB)
the header formatting also should be set to match the first section.
<
should be:
<
The link referenced in the fast-rcnn readme file (https://github.com/NervanaSystems/ModelZoo/blob/master/ObjectLocalization/FastRCNN/readme.md) is broken:
https://github.com/NervanaSystems/neon/tree/master/examples/fast-rcnn is no longer present in the neon examples
Clarify in descrption that variable EXECUTOR_NUMBER needs to be set in order to run test.sh
The https://github.com/NervanaSystems/ModelZoo/blob/master/ObjectLocalization/FastRCNN/readme.md includes a reference to an internal file:
This set of weights was trained using the [train.py](/home/jenkins/jenkins_backup_6_2_2016.tar.gz) script for 20 epochs and reaches a mAP of 0.56 on the vaidation data set.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.