Skip to content
This repository has been archived by the owner on Jan 12, 2019. It is now read-only.

models/generated: regenerate number models #15

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

josharian
Copy link
Member

@dgoldman-ebay I renamed some of our model files, and I wanted to re-export them so that the file names would match here. However, the export code was broken for our old files (no dropout_rate, no activation) so I had to fix it up. I was thus disconcerted when this diff came out as big as it is, given that this is the same underlying model as before.

Would you mind looking through this diff and confirming that all these changes are expected and desired? Thanks!

Same underlying models, different filename,
new generation code.
@josharian
Copy link
Member Author

The strip model regeneration looks more like the kind of diff I expected.

By the way, have we checked on the performance impact of removing EIGEN_NO_DEBUG?

@dgoldman-pdx
Copy link
Member

I'll try to take a look late tonight, or else as soon as possible thereafter.

(Our code generators can now handle N-level models; formerly limited to two(?) levels. The changes related to that are probably responsible for most of the diff.)

@josharian
Copy link
Member Author

Any time this week is fine. I have plenty of other things to fix in the meantime. :)

@josharian
Copy link
Member Author

Hmmm. My money is on this not being right. :) It currently doesn't compile, due to the switch from #include "cv/conv.h" to just #include "conv.h". Switching that back causes an explosion of compilation errors from Eigen. Here's a sample error:

In file included from /Users/jbleechersnyder/src/clearcut/dmz/card.io-dmz/dmz_all.cpp:15:
In file included from /Users/jbleechersnyder/src/clearcut/dmz/card.io-dmz/./cv/sobel.cpp:9:
In file included from /Users/jbleechersnyder/src/clearcut/dmz/card.io-dmz/eigen.h:25:
In file included from /Users/jbleechersnyder/src/clearcut/dmz/card.io-dmz/Eigen/Core:284:
/Users/jbleechersnyder/src/clearcut/dmz/card.io-dmz/Eigen/src/Core/Assign.h:493:32: error: no member named
      'YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY' in
      'Eigen::internal::static_assertion<false>'
  EIGEN_STATIC_ASSERT(SameType,YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYP...
                               ^
/Users/jbleechersnyder/src/clearcut/dmz/card.io-dmz/Eigen/src/Core/util/StaticAssert.h:114:65: note: expanded from macro
      'EIGEN_STATIC_ASSERT'
        if (Eigen::internal::static_assertion<bool(CONDITION)>::MSG) {}
                                                                ^
/Users/jbleechersnyder/src/clearcut/dmz/card.io-dmz/Eigen/src/Core/PlainObjectBase.h:414:20: note: in instantiation of function template
      specialization 'Eigen::DenseBase<Eigen::Matrix<float, 8, 40, 1, 8, 40>
      >::lazyAssign<Eigen::CwiseUnaryOp<std::__1::pointer_to_unary_function<double, double>, const Eigen::Matrix<float, 8, 40, 1, 8, 40> >
      >' requested here
      return Base::lazyAssign(other.derived());
                   ^
/Users/jbleechersnyder/src/clearcut/dmz/card.io-dmz/Eigen/src/Core/Assign.h:520:97: note: in instantiation of function template
      specialization 'Eigen::PlainObjectBase<Eigen::Matrix<float, 8, 40, 1, 8, 40>
      >::lazyAssign<Eigen::CwiseUnaryOp<std::__1::pointer_to_unary_function<double, double>, const Eigen::Matrix<float, 8, 40, 1, 8, 40> >
      >' requested here
  static EIGEN_STRONG_INLINE Derived& run(Derived& dst, const OtherDerived& other) { return dst.lazyAssign(other.derived()); }
                                                                                                ^
/Users/jbleechersnyder/src/clearcut/dmz/card.io-dmz/Eigen/src/Core/PlainObjectBase.h:621:69: note: in instantiation of member function
      'Eigen::internal::assign_selector<Eigen::Matrix<float, 8, 40, 1, 8, 40>,
      Eigen::CwiseUnaryOp<std::__1::pointer_to_unary_function<double, double>, const Eigen::Matrix<float, 8, 40, 1, 8, 40> >, false,
      false>::run' requested here
      return internal::assign_selector<Derived,OtherDerived,false>::run(this->derived(), other.derived());
                                                                    ^
/Users/jbleechersnyder/src/clearcut/dmz/card.io-dmz/Eigen/src/Core/PlainObjectBase.h:606:102: note: in instantiation of function template
      specialization 'Eigen::PlainObjectBase<Eigen::Matrix<float, 8, 40, 1, 8, 40>
      >::_set_noalias<Eigen::CwiseUnaryOp<std::__1::pointer_to_unary_function<double, double>, const Eigen::Matrix<float, 8, 40, 1, 8, 40>
      > >' requested here
    EIGEN_STRONG_INLINE void _set_selector(const OtherDerived& other, const internal::false_type&) { _set_noalias(other); }
                                                                                                     ^
/Users/jbleechersnyder/src/clearcut/dmz/card.io-dmz/Eigen/src/Core/PlainObjectBase.h:598:7: note: in instantiation of function template
      specialization 'Eigen::PlainObjectBase<Eigen::Matrix<float, 8, 40, 1, 8, 40>
      >::_set_selector<Eigen::CwiseUnaryOp<std::__1::pointer_to_unary_function<double, double>, const Eigen::Matrix<float, 8, 40, 1, 8, 40>
      > >' requested here
      _set_selector(other.derived(), typename internal::conditional<static_cast<bool>(int(OtherDerived::Flags) & EvalBeforeAssignin...
      ^
/Users/jbleechersnyder/src/clearcut/dmz/card.io-dmz/Eigen/src/Core/Matrix.h:172:20: note: in instantiation of function template
      specialization 'Eigen::PlainObjectBase<Eigen::Matrix<float, 8, 40, 1, 8, 40>
      >::_set<Eigen::CwiseUnaryOp<std::__1::pointer_to_unary_function<double, double>, const Eigen::Matrix<float, 8, 40, 1, 8, 40> > >'
      requested here
      return Base::_set(other);
                   ^
/Users/jbleechersnyder/src/clearcut/dmz/card.io-dmz/./models/generated/modelc_01266c1b.cpp:1939:23: note: in instantiation of function
      template specialization 'Eigen::Matrix<float, 8, 40, 1, 8,
      40>::operator=<Eigen::CwiseUnaryOp<std::__1::pointer_to_unary_function<double, double>, const Eigen::Matrix<float, 8, 40, 1, 8, 40> >
      >' requested here
  accumulated_results = accumulated_results.unaryExpr(std::ptr_fun(tanh));
                      ^

@josharian
Copy link
Member Author

(How does importing just "conv.h" work for the expiry models?)

@dgoldman-pdx
Copy link
Member

(How does importing just "conv.h" work for the expiry models?)

You're building the DMZ in the context of Cython? I don't think that the expiry models are included in that context; they're included only when building CardIO (SCAN_EXPIRY isn't defined in the Cython case).

For building CardIO, $(SRCROOT)/dmz is one of the header search paths. Possibly that's the magic?

Not sure about the Eigen errors...

@dgoldman-pdx
Copy link
Member

FWIW, I just pasted the contents of your new modelc_01266c1b.cpp into my old file of the same name, and tried to build CardIO.

No error re #include "conv.h".

A couple of Eigen errors, though. Sigh.

@josharian
Copy link
Member Author

Any news on this, @dgoldman-ebay?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants