int64 KeyedDenseTensorColumn<int64>::Feature(int64 batch, int64 n,
                                             bool strong_hash) const {
  if (strong_hash) {
    if (DT_STRING == tensor_.dtype()) {
      return StrongKeyedHash(key_, tensor_.matrix<tstring>()(batch, n));
    }
    return StrongKeyedHash(
        key_, {reinterpret_cast<const char*>(tensor_.matrix<int64>()(batch, n)),
               sizeof(tensor_.dtype())});
  }
  if (DT_STRING == tensor_.dtype())
    return Fingerprint64(tensor_.matrix<tstring>()(batch, n));
  return tensor_.matrix<int64>()(batch, n);
}
int64 KeyedDenseTensorColumn<int64>::Feature(int64 batch, int64 n,
                                             bool strong_hash) const {
  if (strong_hash) {
    if (DT_STRING == tensor_.dtype()) {
      return StrongKeyedHash(key_, tensor_.matrix<tstring>()(batch, n));
    }
    return StrongKeyedHash(
        key_, {reinterpret_cast<const char*>(tensor_.matrix<int64>()(batch, n)),
               sizeof(tensor_.dtype())});
  }
  if (DT_STRING == tensor_.dtype())
    return Fingerprint64(tensor_.matrix<tstring>()(batch, n));
  return tensor_.matrix<int64>()(batch, n);
}