Questions tagged [bidirectional]

"Bidirectional" refers to any process or structure that works in two directions. Use the tag `bidi` for bidirectional text instead of this tag.

"Bidirectional" is a general concept and can have a lot of meanings:

  • bidirectional text, see
  • bidirectional associations of data
  • bidirectional synchronization
  • bidirectional mapping
  • bidirectional communication
  • bidirectional search algorithms

See also: https://en.wikipedia.org/wiki/Bidirectional

493 questions
7
votes
0 answers

How to extract state c and h from bidirectional LSTM in keras

I am trying to train a seq2seq translator using Keras functional API. The following code works fine: encoder_inputs = Input(shape=(None, num_encoder_tokens)) encoder = LSTM(latent_dim, return_state=True) encoder_outputs, state_h, state_c =…
Mauro Gentile
  • 1,463
  • 6
  • 26
  • 37
7
votes
2 answers

Bi-directional LSTM for variable-length sequence in Tensorflow

I want to train a bi-directional LSTM in tensorflow to perform a sequence classification problem (sentiment classification). Because sequences are of variable lengths, batches are normally padded with vectors of zero. Normally, I use the…
Ramy Baly
  • 73
  • 1
  • 3
7
votes
1 answer

How can I create a two-way SSL socket in Ruby

I am building a client Ruby library that connects to a server and waits for data, but also allows users to send data by calling a method. The mechanism I use is to have a class that initializes a socket pair, like so: def initialize @pipe_r,…
ostinelli
  • 225
  • 3
  • 7
7
votes
2 answers

How to update an object from the UI with Android Data Binding?

I am using Data Binding and I've created a very simple class public class ViewUser extends BaseObservable { private String name; @Bindable public String getName() { return name; } public void setName(String name) { …
7
votes
2 answers

Bidirectional multimap equivalent data structure

I know that Guava has a BiMultimap class internally but didn't outsource the code. I need a data structure which is bi-directional, i.e. lookup by key and by value and also accepts duplicates. i.e. something like this: (in my case, values are…
Bernice
  • 2,552
  • 11
  • 42
  • 74
7
votes
1 answer

How to read/write to Linux pseudoterminals using separate processes but without forking?

I'd like to write a program that emulates a device on a serial port. I'm trying to use pseudoterminals to accomplish this. I want one distinct process to control the master. This process acts as the serial device emulator. I want another process…
acker9
  • 363
  • 2
  • 11
6
votes
1 answer

Why is Iterator::rev defined on Iterator and not DoubleEndedIterator

Rust has two main traits for iteration: the standard Iterator for things that can be traversed in order, and DoubleEndedIterator for things that can additionally be iterated from the back. This makes sense to me. A lot of useful methods are defined…
Silvio Mayolo
  • 62,821
  • 6
  • 74
  • 116
6
votes
2 answers

styling bidirectional websites CSS best practice?

I am working on a website consists of four languages (Arabic, English, French and Spanish), (Arabic is a right-to-left language for people who don't know that). Basically left-to-right (en, es and fr) sites will have the same layout/CSS. in order to…
Anas Nakawa
  • 1,977
  • 1
  • 23
  • 42
6
votes
6 answers

how to Fix spring boot one to many bidirectional infinity loop?

i am try to create a one to many bidirectional mapping using spring boot and spring data jpa please look the below entity Employer Entity @Entity public class Employer { private Long id; private String employerName; private…
6
votes
1 answer

StackOverflowError with JPA bidirectional references in Kotlin

I have data classes as following: @Entity @Table(name = "SECTIONS") data class Section( @Id @GeneratedValue @Column(name = "ID") var id: Long = 0, @Column(name = "NAME") var name: String = "", …
zenn1337
  • 481
  • 1
  • 5
  • 25
6
votes
1 answer

How would one implement a bidirectional map in Swift?

I am currently in need of a performant bidirectional map. In Swift, a dictionary can be reversed, however, that will return a tuple of the types it is made of, not a counterpart dictionary. Is there a library for that or does someone have ideas on…
Lukas Süsslin
  • 553
  • 1
  • 3
  • 12
6
votes
1 answer

Tensorflow : ValueError: Shape must be rank 2 but is rank 3

I'm new to tensorflow and I'm trying to update some code for a bidirectional LSTM from an old version of tensorflow to the newest (1.0), but I get this error: Shape must be rank 2 but is rank 3 for 'MatMul_3' (op: 'MatMul') with input shapes:…
D. Clem
  • 85
  • 1
  • 6
6
votes
1 answer

How do stateful bidirectional RNNs work in Keras

In Keras the Bidirectional wrapper for RNNs also supports stateful=true. I don't really understand how this is supposed to work: In a stateful unidirectional model the state of a batch is carried over to the next batch. I guess it works the same for…
birnbaum
  • 4,718
  • 28
  • 37
6
votes
4 answers

advance the iterator of a standard map

The main question is already in the title: How do I advance the iterator of a standard map? But since most people ask why I need this, I'll provide some more information: I have a class which has several maps. I have at least 2 differential…
Rico-E
  • 1,806
  • 2
  • 28
  • 47
6
votes
0 answers

Fetching Bidirectional DbRef relations Spring Data + MongoDB

I am new to MongoDB. I am preparing an example for learning. It looks like when working with bi-directional relationship with Spring Data & DBRef, it gets into end-less cycle and keeps reading the association again and again. The domain class looks…
Vishal Shukla
  • 2,848
  • 2
  • 17
  • 19
1 2
3
32 33