dalmia / deep-learning-tutorials Goto Github PK
View Code? Open in Web Editor NEWDeep learning tutorials for classification of MNIST digits using CNNs and solutions to assignments for Udacity's deep learning course
License: MIT License
Deep learning tutorials for classification of MNIST digits using CNNs and solutions to assignments for Udacity's deep learning course
License: MIT License
There are many errors that occurs in TensorFlow 1.5 and TensorFlow 2.1. Even though I corrected some of the errors, it has generated a new error as follows.
ValueError: The initial value's shape (()) is not compatible with the explicitly supplied shape
argument ([11, 11, 3, 96]).
I get to know that there is the scope conflict between the shape and the conv argument. tf.variable_scope() usually defines global variables in the with context. It influences other related variables. For instance, shape= [filter_height, filter_width, input_channels//groups, num_filters], it denotes [11,11,3,96] in the Conv1; in contrast, Conv1 includes the arguments: 11, 11, 96, 4, 4.
Please see the detailed error message as follows.
$ python finetune.py --conv=4 --dropout_rate=0.3
Traceback (most recent call last):
File "finetune.py", line 291, in
tf.app.run(main=main, argv=[sys.argv[0]] + unparsed)
File "/home/mike/miniconda3/lib/python3.7/site-packages/tensorflow_core/python/platform/app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "/home/mike/miniconda3/lib/python3.7/site-packages/absl/app.py", line 299, in run
_run_main(main, args)
File "/home/mike/miniconda3/lib/python3.7/site-packages/absl/app.py", line 250, in _run_main
sys.exit(main(argv))
File "finetune.py", line 201, in main
FLAGS.dropout_rate, FLAGS.additional)
File "finetune.py", line 43, in train
model = AlexNet(x, keep_prob, num_classes, train_layers, fc, conv, additional)
File "/home/mike/Documents/Finetuning-AlexNet/model.py", line 33, in init
self.create()
File "/home/mike/Documents/Finetuning-AlexNet/model.py", line 89, in create
conv1 = conv(self.x, 11, 11, 96, 4, 4, padding='VALID', name='conv1')
File "/home/mike/Documents/Finetuning-AlexNet/model.py", line 154, in conv
num_filters])
File "/home/mike/miniconda3/lib/python3.7/site-packages/tensorflow_core/python/ops/variables.py", line 260, in call
return cls._variable_v2_call(*args, **kwargs)
File "/home/mike/miniconda3/lib/python3.7/site-packages/tensorflow_core/python/ops/variables.py", line 254, in _variable_v2_call
shape=shape)
File "/home/mike/miniconda3/lib/python3.7/site-packages/tensorflow_core/python/ops/variables.py", line 235, in
previous_getter = lambda **kws: default_variable_creator_v2(None, **kws)
File "/home/mike/miniconda3/lib/python3.7/site-packages/tensorflow_core/python/ops/variable_scope.py", line 2645, in default_variable_creator_v2
shape=shape)
File "/home/mike/miniconda3/lib/python3.7/site-packages/tensorflow_core/python/ops/variables.py", line 262, in call
return super(VariableMetaclass, cls).call(*args, **kwargs)
File "/home/mike/miniconda3/lib/python3.7/site-packages/tensorflow_core/python/ops/resource_variable_ops.py", line 1411, in init
distribute_strategy=distribute_strategy)
File "/home/mike/miniconda3/lib/python3.7/site-packages/tensorflow_core/python/ops/resource_variable_ops.py", line 1549, in _init_from_args
(initial_value.shape, shape))
ValueError: The initial value's shape (()) is not compatible with the explicitly supplied shape
argument ([11, 11, 3, 96]).
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.