How can one measure the time dependency of an RNN?

Most of the discussion about RNN and LSTM alludes to the varying ability of different RNNs to capture "long term dependency". However, most demonstrations use generated text to show the absence of long term dependency for vanilla RNN.

Is there any way to explicitly measure the term dependency of a given trained RNN, much like ACF and PACF of a given ARMA time series?

I am currently trying to look at the (Frobenius norm of) gradients of memories $ s_k$ against inputs $ x_k$ , summed over training examples $ \{x^i\}_{i=1}^N$ $ \sum_{i=1}^N \big\|\frac{\partial s_k}{\partial x_k}(x^i)\big\|_F$ . I would like to know if there are more refined or widely-used alternatives.

Thank you very much!

Algorithm for undirected projective dependency parsing

I am looking for an algorithm that will get an optimal projective undirected dependency parse.

That is, given the sentence ‘Mary does love John’, and an edge-weight function $ f$ (that is, a function from pairs of words in the sentence to real numbers), like

$ f$ (Mary,does) = 1

$ f$ (Mary,love) = 5

$ f$ (Mary,John) = 2

$ f$ (does,love) = 2

$ f$ (does,John) = 3

$ f$ (love,John) = 5

I want an algorithm that will give the edges of the maximum projective spanning tree as: {(Mary,love), (does,love), (love,John)} with a total weight of 12. That is, it should give this:

Crucially, the algorithm shouldn’t give {(Mary,love), (does,John), (love,John)}, even though it has a higher weight of 13, because in that case the dependencies are not projective (the arcs (Mary,love), (does,John) cross each other). That is, it should not give this:


Equivalently, I am asking: what algorithms exist for finding a Minimum/Maximum Spanning Tree on an ordered graph, such that the resulting structure is projective? A bit more formally: given a totally ordered set of nodes $ (S,<)$ , and a edge weight function $ W: S × S → ℝ$ , is there a good algorithm for finding the optimal-weight spanning tree over this set of nodes, such that the resulting structure has the property that every sub-tree is contiguous in the ordering (for any subtree $ T$ , for all $ t,s$ in $ T$ there is no $ r$ not in $ T$ such that $ t<r<s$ )?

  • Without the projectivity requirement, any classic MST algorithm will do (such as Prim’s, or Kruskal’s).
  • With the projectivity requirement, but for directed graphs/dependencies Eisner’s algorithm (a faster version of Arc-factored Projective Parsing) is standard for getting the optimal directed projective dependency parse.

I am looking for a (probably CYK-like) algorithm like Eisner’s, but which will work on undirected dependency parsing. That is, an algorithm for finding the maximum projective spanning tree for undirected ordered graphs. Or, perhaps, a proof that Eisner’s algorithm will with some modification to work on undirected graphs will be guaranteed to give the optimal projective spanning tree.

Ubuntu 18.04 LTS linux-image-generic dependency problems

Need help badly. I opened up Ubuntu, it needed an update run and I did that but I received an error message for 1 broken package. Opened up synaptic package manager to see that it was a package called linux-image-generic 4.15.0.65.67_amd64. So its new its the latest on Ubuntu’s site. The error message is attached. I’ve tried complete removal through package manager and reinstall twice now. No go. Not sure what to do. Never had this problem before.

Thank you!

Error message detail after attempt at reinstallation

linux-headers installation fails – unmet dependency – libcuda1

I am trying to install CUDA in Ubuntu 18.04.3 LTS according to this documentation from nvidia.

I ran into trouble when I tried to install linux headers by the following command.

sudo apt-get install linux-headers-$  (uname -r) 

It raised an Unmet dependencies error.

The following packages have unmet dependencies:  libcuinj64-9.1 : Depends: libcuda1 (>= 387.26) or                            libcuda-9.1-1 E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). 

When I tried

sudo apt --fix-broken install 

I got

dpkg: error processing archive /var/cache/apt/archives/libnvidia-compute-430_430.26-0ubuntu0.18.04.2_amd64.deb (--unpack):  trying to overwrite '/usr/lib/x86_64-linux-gnu/libnvidia-ml.so', which is also in package nvidia-340 340.107-0ubuntu0.18.04.3 Errors were encountered while processing:  /var/cache/apt/archives/libnvidia-compute-430_430.26-0ubuntu0.18.04.2_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) 

The whole terminal output can be seen here.

This is the gpu I have.

  *-display                         description: VGA compatible controller        product: GM204 [GeForce GTX 970]        vendor: NVIDIA Corporation        physical id: 0        bus info: pci@0000:01:00.0        version: a1        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress vga_controller bus_master cap_list rom        configuration: driver=nouveau latency=0        resources: irq:29 memory:f6000000-f6ffffff memory:e0000000-efffffff memory:f0000000-f1ffffff ioport:e000(size=128) memory:c0000-dffff 

I am not sure where to go from here.

Can’t install DiffMerge. Error showing “dependency is not satisfiable :libcurl3(>=7.16.2-1)”

I was trying to install DiffMerge. I downloaded the .deb package from the SourceGear website. But while installing it, it shows the following error

dependency is not satisfiable :libcurl3(>=7.16.2-1)

Can anyone please help me in solving this issue?
As I am studying Java, I need DiffMerge as it helps to compare the codes.

Why snap dependency management is so broken?

snap has 2 modules: snap-store and gnome-3-28-1804, the first one depends on the second.

Yet when I use $ snap remove gnome-3-28-1804, I got no error information: no warning of consequence, no prompt to remove snap-store, no nothing.

So obviously the next time I use snap-store I got the following error:

$   snap-store  /home/peng/snap/snap-store/common/.cache/gio-modules/libgiognomeproxy.so: cannot open shared object file: No such file or directory Failed to load module: /home/peng/snap/snap-store/common/.cache/gio-modules/libgiognomeproxy.so /home/peng/snap/snap-store/common/.cache/gio-modules/libdconfsettings.so: cannot open shared object file: No such file or directory Failed to load module: /home/peng/snap/snap-store/common/.cache/gio-modules/libdconfsettings.so /home/peng/snap/snap-store/common/.cache/gio-modules/libgiolibproxy.so: cannot open shared object file: No such file or directory Failed to load module: /home/peng/snap/snap-store/common/.cache/gio-modules/libgiolibproxy.so /home/peng/snap/snap-store/common/.cache/gio-modules/libgiognutls.so: cannot open shared object file: No such file or directory Failed to load module: /home/peng/snap/snap-store/common/.cache/gio-modules/libgiognutls.so 20:09:52:0025 Gtk Locale not supported by C library.         Using the fallback 'C' locale. 20:09:52:0155 Gtk Failed to load module "canberra-gtk-module" 20:09:52:0163 Gtk Failed to load module "canberra-gtk-module" 20:09:52:0167 GLib-GIO Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications. 20:09:52:0221 Gs  enabled plugins: odrs, rewrite-resource, snap, icons, key-colors, key-colors-metadata 20:09:52:0221 Gs  disabled plugins: appstream, desktop-categories, desktop-menu-path, dpkg, dummy, epiphany, fedora-pkgdb-collections, generic-updates, hardcoded-blacklist, hardcoded-featured, hardcoded-popular, modalias, os-release, provenance, provenance-license, repos, shell-extensions Fontconfig error: Cannot load default config file 20:09:52:0342 Gtk Could not load a pixbuf from icon theme. This may indicate that pixbuf loaders or the mime database could not be found. ** Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /snap/snap-store/188/data-dir/icons/Adwaita/16x16/status/image-missing.png: Unrecognized image file format (gdk-pixbuf-error-quark, 3) Aborted                              

My question is: why snap chose to make such a low level mistake?

Postgres – how to investigate a dependency before DROPing a field

I want to drop a field from a partitioned table, POSTGRES claims there are dependencies and proposes using CASCADE. How can I check that nothing important will be deleted before risking DROP with CASCADE?

My table is defined as (edited for brevity) –

CREATE TABLE public.positionfix (     fixid3 integer,     fixid bigint NOT NULL DEFAULT nextval('positionfix_fixid_seq'::regclass),     messageid bigint NOT NULL,     fixtime timestamp with out timezone NOT NULL ) PARTITION BY RANGE (fixtime)  WITH (     OIDS = FALSE ) TABLESPACE fastspace; 

I’m trying to remove the field ‘fixId3’ using the command –

ALTER TABLE positionfix  DROP COLUMN fixId3; 

The error messages I get are –

ERROR:  cannot drop table positionfix column fixid3 because other objects depend on it DETAIL:  default for table positionfix column fixid depends on sequence positionfix_fixid_seq default for table positionfix_201909 column fixid depends on sequence positionfix_fixid_seq default for table positionfix_20190926 column fixid depends on sequence positionfix_fixid_seq default for table positionfix_20190927 column fixid depends on sequence positionfix_fixid_seq default for table positionfix_20190928 column fixid depends on sequence positionfix_fixid_seq HINT:  Use DROP ... CASCADE to drop the dependent objects too. SQL state: 2BP01 

All the tables mentioned in the errors are partitions of the parent table. The issue is that the error message mentions other objects dependent on “fixId3”, but the detail messages refer to a different field “fixId”

There should be nothing that’s dependent on “fixId3”.

My questions are

1) Based on the messages above, which additional objects will postgres delete if I attempt to drop “fixId3” with the cascade option? Field “fixId”? the sequence? both? Something else?

2) why is postgres listing a dependency between “fixId” and the sequence “positionfix_fixid_seq” when the field being deleted is “fixId3”?

3) how do I remove “fixId3” without risking accidentally removing “fixId” instead. (I am reluctant to try CASCADE before I understand the consequences.

Error al importar componente en Vue: This dependency was not found:

Intento importar un componente (Footer.vue) tan simplemente como lo he hecho con el componente TodoList.vue :

import Vue from 'vue' import Router from 'vue-router' import TodoList from '@/components/TodoList' import Footer from "@/component/Footer"  Vue.use(Router)  export default new Router({   routes: [     {       path: '/',       name: 'TodoList',       component: TodoList     },     {       path: "/",       name: "Footer",       component: Footer     }   ] })

Sin embargo me aparece el siguiente error (antes ya de añadirlo también en las routes de Router, pero no cambia nada al añadir la ruta):

This dependency was not found:  * @/component/Footer in ./src/router/index.js  To install it, you can run: npm install --save @/component/Footer

En el Footer.vue lo tengo de la misma manera que el otro que si se importa correctamente:

<script> export default {     name: "Footer" } </script>

WARNING in Circular dependency detected: src\app\app.module.ts -> src\app\app.module.ngfactory.js -> src\app\app.module.ts

Tengo una aplicación con angular, y cuando intento

 ng build --prod 

Siempre sale

WARNING in Circular dependency detected: src\app\app.module.ts -> src\app\app.module.ngfactory.js ->  src\app\app.module.ts 

¿Por que sucede esto, y como puedo solucionarlo?

Muchas gracias por vuestra atención