Week2 programming assignment problem

Hello . I can’t run my code . the same thing happened at first weeks assignment and I couldn’t fix that too .


its stocked here .

After you pushed “>Run”, did you wait up to 15 minutes for that cell to finish running?

Yes and I waited more than that

Hopefully a mentor for the NLP course will stop by with some assistance.

Hi @Mahdi_Seddigh

Have you resolved your problem?

If you’re having problems with multiple Assignments (as I understand from your post) then the problem might lie in the Coursera servers and you should try some time later when they resolve their problems.

Also, this could happen because of bugs in your code. (as I understand from the time of your last post - a couple of days have passed?).

So, if you’re still having problems, please let me know.

Cheers

hello, I have a relevant problem…in the same block of code, when I run it I get an error…


IndexError Traceback (most recent call last)
in
4
5 # Load the pre-trained weights
----> 6 model.init_from_file(‘model.pkl.gz’, weights_only=True)

/opt/conda/lib/python3.7/site-packages/trax/layers/base.py in init_from_file(self, file_name, weights_only, input_signature)
351 weights, state = unflatten_weights_and_state(
352 dictionary[‘flat_weights’], dictionary[‘flat_state’],
→ 353 weights_and_state_sig, weights_only=weights_only)
354 if not weights_only:
355 self.state = state

/opt/conda/lib/python3.7/site-packages/trax/layers/base.py in unflatten_weights_and_state(flat_weights, flat_state, weights_and_state_signature, weights_only)
835 weights_to_copy = [EMPTY_WEIGHTS, GET_WEIGHTS_FROM_CACHE]
836 weights, _ = fastmath.tree_unflatten(flat_weights, weights_tree,
→ 837 copy_from_tree=weights_to_copy)
838 state = None
839 if not weights_only:

/opt/conda/lib/python3.7/site-packages/trax/fastmath/numpy.py in tree_unflatten(flat, tree, copy_from_tree)
242 new_tree, rest = , flat
243 for t in tree:
→ 244 new_t, rest = tree_unflatten(rest, t, copy_from_tree=copy_from_tree)
245 new_tree.append(new_t)
246 new_tree = tuple(new_tree) if isinstance(tree, tuple) else new_tree

/opt/conda/lib/python3.7/site-packages/trax/fastmath/numpy.py in tree_unflatten(flat, tree, copy_from_tree)
242 new_tree, rest = , flat
243 for t in tree:
→ 244 new_t, rest = tree_unflatten(rest, t, copy_from_tree=copy_from_tree)
245 new_tree.append(new_t)
246 new_tree = tuple(new_tree) if isinstance(tree, tuple) else new_tree

/opt/conda/lib/python3.7/site-packages/trax/fastmath/numpy.py in tree_unflatten(flat, tree, copy_from_tree)
252 new_tree[k] = new_v
253 return new_tree, rest
→ 254 return flat[0], flat[1:]
255
256

IndexError: list index out of range

As result, I cannot load the model and continue…
My lab ID is xttdwkolcnqi