Comments (6)
The error happens in the following function. outputs
is a tensor itself and not a list of tensors. I am using Pytorch 0.4. I can't imagine how this can be due to that. Everything else is the same version.
def forward(self, emb, context, state):
"""
Forward through the decoder.
Args:
input (LongTensor): a sequence of input tokens tensors
of size (len x batch x nfeats).
context (FloatTensor): output(tensor sequence) from the encoder
RNN of size (src_len x batch x hidden_size).
state (FloatTensor): hidden state from the encoder RNN for
initializing the decoder.
Returns:
outputs (FloatTensor): a Tensor sequence of output from the decoder
of shape (len x batch x hidden_size).
state (FloatTensor): final hidden state from the decoder.
attns (dict of (str, FloatTensor)): a dictionary of different
type of attention Tensor from the decoder
of shape (src_len x batch).
"""
# Args Check
assert isinstance(state, RNNDecoderState)
# END Args Check
# Run the forward pass of the RNN.
hidden, outputs, attns = self._run_forward_pass(emb, context, state)
# Update the state with the result.
state.update_state(hidden)
# Concatenates sequence of tensors along a new dimension.
outputs = torch.stack(outputs)
for k in attns:
attns[k] = torch.stack(attns[k])
return outputs, state, attns
from coarse2fine.
I got the PyTorch version 0.2.0.post3 and it works now!
from coarse2fine.
I will let the issue open in case it was of interest to make this work with Pytorch 0.4.0.
from coarse2fine.
Requirements
- Python 3.5
- PyTorch 0.2.0.post3 (GPU)
Install Python dependency
pip install -r requirements.txt
from coarse2fine.
I got the PyTorch version 0.2.0.post3 and it works now!
when i type the "pip install -r requirements.txt" but it says "Could not find a version that satisfies the requirement torch==0.2.0.post3"
from coarse2fine.
use "conda install pytorch==0.2.0" works !!
from coarse2fine.
Related Issues (20)
- can't pickle generator objects HOT 4
- How is lay encoder connected to fine meaning decoder? HOT 1
- output dimension of classifier HOT 2
- Fail to load the pretrained model
- LICENSE missing HOT 1
- GEO and ATIS results HOT 4
- Model Evaluation HOT 1
- Missing "ent" in annotation HOT 1
- Segmentation fault when i run the run.sh HOT 2
- ImportError: No module named 'path' HOT 3
- How to use it with DB other than WikiSQL
- missing some files HOT 6
- error in decoding with small batch sizes HOT 1
- data processing issue HOT 1
- Train on new DataSet for code generation ( Natural Languag to java code)
- use of lstm units in encoder HOT 2
- Changing the 'lay' variable
- what is the use of "len_tgt_list" ,cond_span_l_loss,cond_span_r_loss? HOT 4
- Segmentation fault (core dumped) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coarse2fine.