一、写在前面
参考:https://www.cnblogs.com/bentuwuying/p/8186364.html
简介:全连接孪生网络(siamese network)是一种相似性度量方法,适用于类别数目多但是每类的样本数少的分类问题。
代码:https://github.com/Shicoder/DeepLearning_Demo/tree/master/siamese_tf_mnist
二、测试代码
按照github代码运行python run.py后报错:
【报错1】
AttributeError: module ‘tensorflow‘ has no attribute ‘sub‘
AttributeError: module ‘tensorflow‘ has no attribute ‘mul‘
【解决1】
将代码inference.py中的tf.sub替换为tf.subtract,tf.mul替换为tf.multiply
----------------------------------------------------------------------------------------------------------------
【报错2】
NotFoundError (see above for traceback): Failed to create a directory: ; No such file or directory
[[Node: save/SaveV2 = SaveV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT],