wzell / cmd Goto Github PK
View Code? Open in Web Editor NEWCentral Moment Discrepancy for Domain-Invariant Representation Learning (ICLR 2017, keras)
Central Moment Discrepancy for Domain-Invariant Representation Learning (ICLR 2017, keras)
`C:\Users\jindongwang\Anaconda3\python.exe C:/Users/jindongwang/Desktop/cmd-master/exp_office.py
Using TensorFlow backend.
WARNING (theano.configdefaults): g++ not detected ! Theano will be unable to execute optimized C-implementations (for both CPU and GPU) and will default to Python implementations. Performance will be severely degraded. To remove this warning, set Theano flags cxx to an empty string.
Loading office image data...
Found 2817 images belonging to 31 classes.
Found 498 images belonging to 31 classes.
Found 795 images belonging to 31 classes.
Creating/Loading image representations via VGG_16 model...
C:\Users\jindongwang\Anaconda3\lib\site-packages\keras\legacy\interfaces.py:86: UserWarning: Update your Conv2D
call to the Keras 2 API: Conv2D(64, (3, 3), activation="relu")
'call to the Keras 2 API: ' + signature) C:\Users\jindongwang\Anaconda3\lib\site-packages\keras\legacy\interfaces.py:86: UserWarning: Update your
Conv2Dcall to the Keras 2 API:
Conv2D(128, (3, 3), activation="relu") '
call to the Keras 2 API: ' + signature)
Traceback (most recent call last):
File "C:\Users\jindongwang\Anaconda3\lib\site-packages\tensorflow\python\framework\common_shapes.py", line 671, in _call_cpp_shape_fn_impl
input_tensors_as_shapes, status)
File "C:\Users\jindongwang\Anaconda3\lib\contextlib.py", line 66, in exit
next(self.gen)
File "C:\Users\jindongwang\Anaconda3\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 466, in raise_exception_on_not_ok_status
pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.InvalidArgumentError: Negative dimension size caused by subtracting 2 from 1 for 'max_pooling2d_2/MaxPool' (op: 'MaxPool') with input shapes: [?,1,112,128].
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/jindongwang/Desktop/cmd-master/exp_office.py", line 53, in
'amazon', N_IMAGES_AM)
File "C:\Users\jindongwang\Desktop\cmd-master\models\office_mmatch.py", line 154, in create_img_repr
vgg16 = self.VGG_16(weights_file)
File "C:\Users\jindongwang\Desktop\cmd-master\models\office_mmatch.py", line 285, in VGG_16
model.add(MaxPooling2D((2,2), strides=(2,2)))
File "C:\Users\jindongwang\Anaconda3\lib\site-packages\keras\models.py", line 455, in add
output_tensor = layer(self.outputs[0])
File "C:\Users\jindongwang\Anaconda3\lib\site-packages\keras\engine\topology.py", line 554, in call
output = self.call(inputs, **kwargs)
File "C:\Users\jindongwang\Anaconda3\lib\site-packages\keras\layers\pooling.py", line 154, in call
data_format=self.data_format)
File "C:\Users\jindongwang\Anaconda3\lib\site-packages\keras\layers\pooling.py", line 217, in _pooling_function
pool_mode='max')
File "C:\Users\jindongwang\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py", line 3014, in pool2d
x = tf.nn.max_pool(x, pool_size, strides, padding=padding)
File "C:\Users\jindongwang\Anaconda3\lib\site-packages\tensorflow\python\ops\nn_ops.py", line 1769, in max_pool
name=name)
File "C:\Users\jindongwang\Anaconda3\lib\site-packages\tensorflow\python\ops\gen_nn_ops.py", line 1605, in _max_pool
data_format=data_format, name=name)
File "C:\Users\jindongwang\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 767, in apply_op
op_def=op_def)
File "C:\Users\jindongwang\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 2508, in create_op
set_shapes_for_outputs(ret)
File "C:\Users\jindongwang\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1873, in set_shapes_for_outputs
shapes = shape_func(op)
File "C:\Users\jindongwang\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1823, in call_with_requiring
return call_cpp_shape_fn(op, require_shape_fn=True)
File "C:\Users\jindongwang\Anaconda3\lib\site-packages\tensorflow\python\framework\common_shapes.py", line 610, in call_cpp_shape_fn
debug_python_shape_fn, require_shape_fn)
File "C:\Users\jindongwang\Anaconda3\lib\site-packages\tensorflow\python\framework\common_shapes.py", line 676, in _call_cpp_shape_fn_impl
raise ValueError(err.message)
ValueError: Negative dimension size caused by subtracting 2 from 1 for 'max_pooling2d_2/MaxPool' (op: 'MaxPool') with input shapes: [?,1,112,128].
What can I do?
I am interested in your work and i had run your code of cmd successfully but i still have two problems.
set_layer
on ActivityRegularizer instance before calling the instance.Hi Werner Zellinger:
something wrong happens while running exp_amazon_review.py
error happens while run amazon_review_mmatch.py
encoded_s = encoding(input_s)
encoded_t = encoding(input_t)
I know that domain_regularizer need run set_layer. However,I did not find any code about set_layer.
Can you please link to the paper's openreview page in the README?
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.