soumik12345 / nearest-celebrity-face Goto Github PK
View Code? Open in Web Editor NEWTensorflow Implementation of FaceNet: A Unified Embedding for Face Recognition and Clustering to find the celebrity whose face matches the closest to yours.
Tensorflow Implementation of FaceNet: A Unified Embedding for Face Recognition and Clustering to find the celebrity whose face matches the closest to yours.
I tried to run the code after porting it to Tensorflow 2.0 and for that, I only made changes in the imports. But while creating the model object it throws an error for shape mismatch in feature concatenation operation in inception_block_1a
. Can you please check?
Environment:
Python==3.6.8
Tensorflow==2.1.0
But I think the environment has nothing to do with shape mismatch in the model.
Full traceback of the error:
Traceback (most recent call last): File "inception_blocks_v2.py", line 270, in <module> inception_resnet_v2((3, 96, 96)) File "inception_blocks_v2.py", line 246, in inception_resnet_v2 X = inception_block_1b(X) File "inception_blocks_v2.py", line 75, in inception_block_1b inception = concatenate([X_3x3, X_5x5, X_pool, X_1x1], axis=-1) File "/home/rishab/anaconda3/envs/fr_env/lib/python3.6/site-packages/tensorflow_core/python/keras/layers/merge.py", line 716, in concatenate return Concatenate(axis=axis, **kwargs)(inputs) File "/home/rishab/anaconda3/envs/fr_env/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/base_layer.py", line 748, in __call__ self._maybe_build(inputs) File "/home/rishab/anaconda3/envs/fr_env/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/base_layer.py", line 2116, in _maybe_build self.build(input_shapes) File "/home/rishab/anaconda3/envs/fr_env/lib/python3.6/site-packages/tensorflow_core/python/keras/utils/tf_utils.py", line 306, in wrapper output_shape = fn(instance, input_shape) File "/home/rishab/anaconda3/envs/fr_env/lib/python3.6/site-packages/tensorflow_core/python/keras/layers/merge.py", line 401, in build raise ValueError(err_msg) ValueError: A
Concatenate layer requires inputs with matching shapes except for the concat axis. Got inputs shapes: [(None, 128, 12, 12), (None, 64, 12, 12), (None, 64, 12, 12), (None, 64, 12, 12)]
Thanks in advance.
Any help is appreciated.
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.