Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.4.0-1.3.4-SNAPSHOT problem #491

Closed
bigfanofcpp opened this issue Dec 8, 2017 · 6 comments
Closed

1.4.0-1.3.4-SNAPSHOT problem #491

bigfanofcpp opened this issue Dec 8, 2017 · 6 comments
Labels

Comments

@bigfanofcpp
Copy link

bigfanofcpp commented Dec 8, 2017

offical example src/main/java/ExampleTrainer.java

...
Output a = Const(root, Tensor.create(new float[] {3.f, 2.f, -1.f, 0.f}, new TensorShape(2, 2)));
...

compile error

====

@Namespace("tensorflow")
public static class TensorShape extends tensorflow.TensorShapeBase {
    public TensorShape() {
        super((Pointer)null);
        this.allocate();
    }

    public TensorShape(long size) {
        super((Pointer)null);
        this.allocateArray(size);
    }

    public TensorShape(Pointer p) {
        super(p);
    }
@saudet
Copy link
Member

saudet commented Dec 8, 2017

It looks like we need to use TensorShapeBase these days. Please try with that.

@bigfanofcpp
Copy link
Author

or InsertDim ??

@saudet
Copy link
Member

saudet commented Dec 8, 2017

Yes, those functions still seem to work too!

@saudet saudet added the bug label Dec 8, 2017
@saudet
Copy link
Member

saudet commented Dec 8, 2017

It looks like we need to inherit the constructors:

class TensorShape : public TensorShapeBase<TensorShape> {
 public:
  using TensorShapeBase<TensorShape>::TensorShapeBase;

saudet added a commit to bytedeco/javacpp that referenced this issue Dec 11, 2017
…structors (issue bytedeco/javacpp-presets#491)

 * Fix compiler error when defining `std::set` or `std::unordered_set` with `Parser`
@saudet
Copy link
Member

saudet commented Dec 11, 2017

I've fixed that in the commit above. Thanks for reporting!

@saudet
Copy link
Member

saudet commented Dec 14, 2017

@saudet saudet closed this as completed Dec 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants