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
# Assume Xgt is pixelwise, 1-of-k vector encoded ground truth. | |
# So, Xgt has dimensions (img_height,img_width,num_classes+1), such that the location of the '1' value in the third dimension indicates the true class. | |
# and that location being at "num_classes" indicates lack of available ground truth (i.e. a background pixel). | |
gtexists = tf.less(tf.argmax(Xgt,2),num_classes) | |
fg_gt = tf.boolean_mask(Xgt,gtexists) | |
bg_gt = tf.boolean_mask(Xgt,tf.logical_not(gtexists)) | |
# fg_gt is of shape (?,num_classes+1) because the actual configuration of foreground/background pixels depends on the particular | |
# batch of input, so it is not known when constructing the computational graph here. | |
# Now, we can define separate error terms for errors where a foreground pixel is misclassified |
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
func phasset2json(asset:PHAsset) -> String { | |
let (username,password) = ("","") | |
let authData = "\(username):\(password)".dataUsingEncoding(NSUTF8StringEncoding)! | |
let encoded = authData.base64EncodedStringWithOptions(.Encoding76CharacterLineLength) | |
let basicAuthHeader = "Basic \(encoded)" | |
let urlPath: String = "https://server.com/blah?param=2" | |
let url: NSURL = NSURL(string: urlPath)! | |
var request: NSMutableURLRequest = NSMutableURLRequest(URL: url) | |
let boundary = NSString(format: "---------------------------14737809831466499882746641449") | |
request.HTTPMethod = "POST" |
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
include ../config.h | |
.c.o: | |
$(CC) -c -Dflex $(COPTFLAGS) $(CFLAGS) $(AMBERCFLAGS) $(RISMSFF) $(NETCDFINC) -o $@ $< | |
OBJS = binpos.o conjgrad.o lmodC.o memutil.o nblist.o newton.o nmode.o \ | |
prm.o rand2.o sasad.o sff.o time.o xminC.o AmberNetcdf.o atomic_number.o $(SFF_RISM_INTERFACE) | |
install: libsff hcp_getpdb |