This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% Direct reconstruction | |
I = iradon(proj, 1); | |
subplot(211) | |
imshow(I) | |
title('Reconstructed `iradon`'); | |
%% Manually implement |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""Simple HTTP Server With Upload implemented by Python 2. | |
This module builds on BaseHTTPServer by implementing the standard GET | |
and HEAD requests in a fairly straightforward manner. | |
""" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Structure: | |
# Class variable that specifies expected fields. | |
_fields= [] | |
def __init__(self, *args): | |
if len(args) != len(self._fields): | |
raise TypeError('Expected {} arguments'.format(len(self._fields))) | |
# Set the arguments. | |
for name, value in zip(self._fields, args): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tensorflow.python import pywrap_tensorflow | |
# Get weights or whatever you want. | |
# Notice the filename should be full pathname, e.g. './model-7000' | |
def get_weights(filename): | |
reader = pywrap_tensorflow.NewCheckpointReader(filename) | |
var_to_shape_map = reader.get_variable_to_shape_map() | |
weights = [reader.get_tensor(key) for key in var_to_shape_map if 'weights' in key] | |
return weights |
NewerOlder