plemeri / randwire_tensorflow Goto Github PK
View Code? Open in Web Editor NEWtensorflow implementation of Exploring Randomly Wired Neural Networks for Image Recognition
License: MIT License
tensorflow implementation of Exploring Randomly Wired Neural Networks for Image Recognition
License: MIT License
ζ―εδ»δΉηοΌ
er works well
> python train.py --class_num 10 --image_shape 32 32 3 --stages 4 --channel_count 78 --graph_model er --graph_param 32 0.2 --dropout_rate 0.2 --learning_rate 0.1 --momentum 0.9 --weight_decay 0.0001 --train_set_size 50000 --val_set_size 10000 --batch_size 100 --epochs 100 --checkpoint_dir ./checkpoint --checkpoint_name randwire_cifar10 --train_record_dir ./dataset/cifar10/train.tfrecord --val_record_dir ./dataset/cifar10/test.tfrecord
my env is
(venv) RandWire_tensorflow(master)> pip list
Package Version
--------------------- ---------
absl-py 0.7.1
apparmor 2.13.1
asn1crypto 0.24.0
astor 0.7.1
Brlapi 0.6.7
certifi 2018.1.18
chardet 3.0.4
cryptography 2.3
cupshelpers 1.0
cycler 0.10.0
decorator 4.4.0
Django 2.2.1
gast 0.2.2
glinux-homedir-helper 1
glinux-rebootd 0.1
goobuntu-config-tools 0.1
gpg 1.12.0
grpcio 1.20.1
h5py 2.9.0
idna 2.6
image 1.5.27
IPy 0.83
Keras-Applications 1.0.7
Keras-Preprocessing 1.0.9
keyring 10.6.0
keyrings.alt 3.0
kiwisolver 1.1.0
LibAppArmor 2.13.1
louis 3.7.0
Markdown 3.1
matplotlib 3.0.3
meld 3.18.0
mock 3.0.3
monotonic 1.0
networkx 2.3
numpy 1.16.3
obno 39
onboard 1.4.1
Pillow 6.0.0
pip 19.1
protobuf 3.7.1
psutil 5.4.2
pycairo 1.16.2
pycrypto 2.6.1
pycups 1.9.73
pycurl 7.43.0.2
pygobject 3.26.1
pyinotify 0.9.6
pyOpenSSL 17.5.0
pyparsing 2.4.0
pysmbc 1.0.15.6
python-apt 1.8.3
python-dateutil 2.8.0
python-debian 0.1.32
python-xapp 1.0.0
python-xlib 0.20
pytz 2019.1
pyxattr 0.6.0
pyxdg 0.25
PyYAML 5.1
requests 2.20.0
scour 0.36
SecretStorage 2.3.1
setproctitle 1.1.10
setuptools 41.0.1
six 1.12.0
sqlparse 0.3.0
tensorboard 1.13.1
tensorflow 1.13.1
tensorflow-estimator 1.13.0
termcolor 1.1.0
ufw 0.35
urllib3 1.24
virtualenv 16.5.0
Werkzeug 0.15.2
wheel 0.33.1
youtube-dl 2018.4.25
other graph generators don't work.
> python train.py --class_num 10 --image_shape 32 32 3 --stages 4 --channel_count 78 --graph_model ws --graph_param 32 4 0.75 --dropout_rate 0.2 --learning_rate 0.1 --momentum 0.9 --weight_decay 0.0001 --train_set_size 50000 --val_set_size 10000 --batch_size 100 --epochs 100 --checkpoint_dir ./checkpoint --checkpoint_name randwire_cifar10 --train_record_dir ./dataset/cifar10/train.tfrecord --val_record_dir ./dataset/cifar10/test.tfrecord
+++++++++++++++++++++++++++++++++++++++++++++++++
[Input Arguments]
class_num -> 10
image_shape -> [32, 32, 3]
stages -> 4
channel_count -> 78
graph_model -> ws
graph_param -> [32.0, 4.0, 0.75]
dropout_rate -> 0.2
learning_rate -> 0.1
momentum -> 0.9
weight_decay -> 0.0001
train_set_size -> 50000
val_set_size -> 10000
batch_size -> 100
epochs -> 100
checkpoint_dir -> ./checkpoint
checkpoint_name -> randwire_cifar10
train_record_dir -> ./dataset/cifar10/train.tfrecord
val_record_dir -> ./dataset/cifar10/test.tfrecord
+++++++++++++++++++++++++++++++++++++++++++++++++
WARNING:tensorflow:From /usr/local/google/home/dongseong/workspaces/RandWire_tensorflow/venv/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
WARNING:tensorflow:From /usr/local/google/home/dongseong/workspaces/RandWire_tensorflow/network/RandWire.py:120: separable_conv2d (from tensorflow.python.layers.convolutional) is deprecated and will be removed in a future version.
Instructions for updating:
Use keras.layers.separable_conv2d instead.
WARNING:tensorflow:From /usr/local/google/home/dongseong/workspaces/RandWire_tensorflow/network/RandWire.py:121: batch_normalization (from tensorflow.python.layers.normalization) is deprecated and will be removed in a future version.
Instructions for updating:
Use keras.layers.batch_normalization instead.
WARNING:tensorflow:From /usr/local/google/home/dongseong/workspaces/RandWire_tensorflow/network/RandWire.py:13: dropout (from tensorflow.python.layers.core) is deprecated and will be removed in a future version.
Instructions for updating:
Use keras.layers.dropout instead.
WARNING:tensorflow:From /usr/local/google/home/dongseong/workspaces/RandWire_tensorflow/venv/lib/python3.6/site-packages/tensorflow/python/keras/layers/core.py:143: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.
Instructions for updating:
Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`.
Traceback (most recent call last):
File "train.py", line 170, in <module>
main(args)
File "train.py", line 57, in main
args.graph_model, args.graph_param, args.checkpoint_dir + '/' + 'graphs', False, training)
File "/usr/local/google/home/dongseong/workspaces/RandWire_tensorflow/network/RandWire.py", line 126, in my_small_regime
graph_data = gg.graph_generator(graph_model, graph_param, graph_file_path, 'conv' + str(stage) + '_' + graph_model)
File "/usr/local/google/home/dongseong/workspaces/RandWire_tensorflow/utils/graph_generator.py", line 8, in graph_generator
graph = nx.random_graphs.connected_watts_strogatz_graph(*graph_param)
File "</usr/local/google/home/dongseong/workspaces/RandWire_tensorflow/venv/lib/python3.6/site-packages/decorator.py:decorator-gen-548>", line 2, in connected_watts_strogatz_graph
File "/usr/local/google/home/dongseong/workspaces/RandWire_tensorflow/venv/lib/python3.6/site-packages/networkx/utils/decorators.py", line 464, in _random_state
return func(*new_args, **kwargs)
File "/usr/local/google/home/dongseong/workspaces/RandWire_tensorflow/venv/lib/python3.6/site-packages/networkx/generators/random_graphs.py", line 480, in connected_watts_strogatz_graph
G = watts_strogatz_graph(n, k, p, seed)
File "</usr/local/google/home/dongseong/workspaces/RandWire_tensorflow/venv/lib/python3.6/site-packages/decorator.py:decorator-gen-546>", line 2, in watts_strogatz_graph
File "/usr/local/google/home/dongseong/workspaces/RandWire_tensorflow/venv/lib/python3.6/site-packages/networkx/utils/decorators.py", line 464, in _random_state
return func(*new_args, **kwargs)
File "/usr/local/google/home/dongseong/workspaces/RandWire_tensorflow/venv/lib/python3.6/site-packages/networkx/generators/random_graphs.py", line 411, in watts_strogatz_graph
for j in range(1, k // 2 + 1):
TypeError: 'float' object cannot be interpreted as an integer
> python train.py --class_num 10 --image_shape 32 32 3 --stages 4 --channel_count 78 --graph_model ba --graph_param 32 5 --dropout_rate 0.2 --learning_rate 0.1 --momentum 0.9 --weight_decay 0.0001 --train_set_size 50000 --val_set_size 10000 --batch_size 100 --epochs 100 --checkpoint_dir ./checkpoint --checkpoint_name randwire_cifar10 --train_record_dir ./dataset/cifar10/train.tfrecord --val_record_dir ./dataset/cifar10/test.tfrecord
+++++++++++++++++++++++++++++++++++++++++++++++++
[Input Arguments]
class_num -> 10
image_shape -> [32, 32, 3]
stages -> 4
channel_count -> 78
graph_model -> ba
graph_param -> [32.0, 5.0]
dropout_rate -> 0.2
learning_rate -> 0.1
momentum -> 0.9
weight_decay -> 0.0001
train_set_size -> 50000
val_set_size -> 10000
batch_size -> 100
epochs -> 100
checkpoint_dir -> ./checkpoint
checkpoint_name -> randwire_cifar10
train_record_dir -> ./dataset/cifar10/train.tfrecord
val_record_dir -> ./dataset/cifar10/test.tfrecord
+++++++++++++++++++++++++++++++++++++++++++++++++
WARNING:tensorflow:From /usr/local/google/home/dongseong/workspaces/RandWire_tensorflow/venv/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
WARNING:tensorflow:From /usr/local/google/home/dongseong/workspaces/RandWire_tensorflow/network/RandWire.py:120: separable_conv2d (from tensorflow.python.layers.convolutional) is deprecated and will be removed in a future version.
Instructions for updating:
Use keras.layers.separable_conv2d instead.
WARNING:tensorflow:From /usr/local/google/home/dongseong/workspaces/RandWire_tensorflow/network/RandWire.py:121: batch_normalization (from tensorflow.python.layers.normalization) is deprecated and will be removed in a future version.
Instructions for updating:
Use keras.layers.batch_normalization instead.
WARNING:tensorflow:From /usr/local/google/home/dongseong/workspaces/RandWire_tensorflow/network/RandWire.py:13: dropout (from tensorflow.python.layers.core) is deprecated and will be removed in a future version.
Instructions for updating:
Use keras.layers.dropout instead.
WARNING:tensorflow:From /usr/local/google/home/dongseong/workspaces/RandWire_tensorflow/venv/lib/python3.6/site-packages/tensorflow/python/keras/layers/core.py:143: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.
Instructions for updating:
Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`.
Traceback (most recent call last):
File "/usr/local/google/home/dongseong/workspaces/RandWire_tensorflow/venv/lib/python3.6/site-packages/networkx/utils/decorators.py", line 295, in _nodes_or_number
nodes = list(range(n))
TypeError: 'float' object cannot be interpreted as an integer
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "train.py", line 170, in <module>
main(args)
File "train.py", line 57, in main
args.graph_model, args.graph_param, args.checkpoint_dir + '/' + 'graphs', False, training)
File "/usr/local/google/home/dongseong/workspaces/RandWire_tensorflow/network/RandWire.py", line 126, in my_small_regime
graph_data = gg.graph_generator(graph_model, graph_param, graph_file_path, 'conv' + str(stage) + '_' + graph_model)
File "/usr/local/google/home/dongseong/workspaces/RandWire_tensorflow/utils/graph_generator.py", line 12, in graph_generator
graph = nx.random_graphs.barabasi_albert_graph(*graph_param)
File "</usr/local/google/home/dongseong/workspaces/RandWire_tensorflow/venv/lib/python3.6/site-packages/decorator.py:decorator-gen-552>", line 2, in barabasi_albert_graph
File "/usr/local/google/home/dongseong/workspaces/RandWire_tensorflow/venv/lib/python3.6/site-packages/networkx/utils/decorators.py", line 464, in _random_state
return func(*new_args, **kwargs)
File "/usr/local/google/home/dongseong/workspaces/RandWire_tensorflow/venv/lib/python3.6/site-packages/networkx/generators/random_graphs.py", line 649, in barabasi_albert_graph
G = empty_graph(m)
File "</usr/local/google/home/dongseong/workspaces/RandWire_tensorflow/venv/lib/python3.6/site-packages/decorator.py:decorator-gen-22>", line 2, in empty_graph
File "/usr/local/google/home/dongseong/workspaces/RandWire_tensorflow/venv/lib/python3.6/site-packages/networkx/utils/decorators.py", line 297, in _nodes_or_number
nodes = tuple(n)
TypeError: 'float' object is not iterable
Hi, could you tell me what are the requirements you used specifically, especially the tensorflow versions. Thanks a lot.
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.